14 #include "msdevstudio/MSconfig.h"
25 #if QT_VERSION < 0x040000
27 #include <QtGui/QPaintEngine>
35 using namespace hippodraw;
39 #if QT_VERSION < 0x040000
42 Q3CanvasRectangle ( 0 ),
45 m_crosshairs ( false )
47 assert ( plotter != 0 );
73 int x = static_cast <
int > ( rectOrg.
getX () );
74 int y = static_cast <
int > ( rectOrg.
getY () );
80 int width = static_cast <
int > ( rect.getWidth () );
81 int height = static_cast <
int > ( rect.getHeight () );
84 isEnabled () == true ) {
101 0, 0, width, height );
122 const QColor color (
"black" );
126 #if QT_VERSION < 0x040000
128 dev -> isExtDev () ==
false ) {
132 QPaintEngine * pe = dev -> paintEngine ();
135 type != QPaintEngine::PostScript ) {
174 if ( display != 0 ) {
181 #if QT_VERSION < 0x040000
217 int iw =
static_cast< int > ( w );
218 int ih =
static_cast< int > ( h );
223 iw = static_cast <
int > ( new_width );
246 std::vector < double > & picked )
const
256 m_plotter -> fillPickedPointFrom ( xx, yy, picked );
262 return static_cast <
int > ( x() + dx );
267 return static_cast <
int > ( y() + dy );
272 #if QT_VERSION < 0x040000
275 transformAndFill ( QPolygon & array,
277 const std::vector< double > & x,
278 const std::vector< double > & y,
279 int (
QtView::* xfunc) (
double )
const,
280 int (
QtView::* yfunc) (
double )
const )
282 unsigned int size = x.size();
283 assert ( size == y.size() );
285 for (
unsigned int i = 0; i <
size; i++ ) {
286 int ix = (this->*xfunc) ( x[i] );
287 int iy = (this->*yfunc) ( y[i] );
288 array.setPoint ( i , ix, iy );
296 const std::vector< double > & y,
300 unsigned int size = x.size();
301 assert ( size == y.size() );
303 #if QT_VERSION < 0x040000
306 QPolygon array ( size );
318 const std::vector < double > & y,
323 unsigned int size = x.size();
324 assert ( size == y.size() );
326 #if QT_VERSION < 0x040000
329 QPolygon array ( size );