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 double newWidth =
width() * scaleFactor;
113 double newHeight =
height() * scaleFactor;
114 xmin = centerX - newWidth / 2.0;
115 xmax = centerX + newWidth / 2.0;
116 ymin = centerY - newHeight / 2.0;
117 ymax = centerY + newHeight / 2.0;
199 QString(
"POLYGON((" ) +
214 return QRectF(( qreal )
xmin, ( qreal )
ymin, ( qreal )
xmax - xmin, ( qreal )
ymax - ymin );
220 if ( automaticPrecision )
225 precision =
static_cast<int>( ceil( -1.0 * log10( qMin(
width(),
height() ) ) ) ) + 1;
227 if ( precision > 20 )
244 rep = QString(
"%1,%2 : %3,%4" )
245 .arg(
xmin, 0,
'f', thePrecision )
246 .arg(
ymin, 0,
'f', thePrecision )
247 .arg(
xmax, 0,
'f', thePrecision )
248 .arg(
ymax, 0,
'f', thePrecision );
263 QTextStream foo( &rep );
265 foo.setRealNumberPrecision( 8 );
266 foo.setRealNumberNotation( QTextStream::FixedNotation );
292 return ( !
operator==( r1 ) );