23 #include <QTextStream>
32 : xmin( newxmin ), ymin( newymin ), xmax( newxmax ), ymax( newymax )
44 xmin = qRectF.topLeft().x();
45 ymin = qRectF.topLeft().y();
46 xmax = qRectF.bottomRight().x();
47 ymax = qRectF.bottomRight().y();
101 double centerX, centerY;
112 scale( scaleFactor, centerX, centerY );
117 double newWidth =
width() * scaleFactor;
118 double newHeight =
height() * scaleFactor;
119 xmin = centerX - newWidth / 2.0;
120 xmax = centerX + newWidth / 2.0;
121 ymin = centerY - newHeight / 2.0;
122 ymax = centerY + newHeight / 2.0;
209 QString(
"POLYGON((" ) +
224 return QRectF(( qreal )
xmin, ( qreal )
ymin, ( qreal )
xmax - xmin, ( qreal )
ymax - ymin );
230 if ( automaticPrecision )
235 precision =
static_cast<int>( ceil( -1.0 * log10( qMin(
width(),
height() ) ) ) ) + 1;
237 if ( precision > 20 )
254 rep = QString(
"%1,%2 : %3,%4" )
255 .arg(
xmin, 0,
'f', thePrecision )
256 .arg(
ymin, 0,
'f', thePrecision )
257 .arg(
xmax, 0,
'f', thePrecision )
258 .arg(
ymax, 0,
'f', thePrecision );
273 QTextStream foo( &rep );
275 foo.setRealNumberPrecision( 8 );
276 foo.setRealNumberNotation( QTextStream::FixedNotation );
302 return ( !
operator==( r1 ) );