23 #include <QTextStream>
33 : xmin( newxmin ), ymin( newymin ), xmax( newxmax ), ymax( newymax )
45 xmin = qRectF.topLeft().x();
46 ymin = qRectF.topLeft().y();
47 xmax = qRectF.bottomRight().x();
48 ymax = qRectF.bottomRight().y();
102 double centerX, centerY;
113 scale( scaleFactor, centerX, centerY );
118 double newWidth =
width() * scaleFactor;
119 double newHeight =
height() * scaleFactor;
120 xmin = centerX - newWidth / 2.0;
121 xmax = centerX + newWidth / 2.0;
122 ymin = centerY - newHeight / 2.0;
123 ymax = centerY + newHeight / 2.0;
218 QString(
"POLYGON((" ) +
232 return QRectF(( qreal )
xmin, ( qreal )
ymin, ( qreal )
xmax - xmin, ( qreal )
ymax - ymin );
238 if ( automaticPrecision )
243 precision =
static_cast<int>( ceil( -1.0 * log10( qMin(
width(),
height() ) ) ) ) + 1;
245 if ( precision > 20 )
262 rep = QString(
"%1,%2 : %3,%4" )
263 .arg(
xmin, 0,
'f', thePrecision )
264 .arg(
ymin, 0,
'f', thePrecision )
265 .arg(
xmax, 0,
'f', thePrecision )
266 .arg(
ymax, 0,
'f', thePrecision );
281 QTextStream foo( &rep );
283 foo.setRealNumberPrecision( 8 );
284 foo.setRealNumberNotation( QTextStream::FixedNotation );
310 return ( !
operator==( r1 ) );