23 #include <QTextStream>
31 : xmin( newxmin ), ymin( newymin ), xmax( newxmax ), ymax( newymax )
91 double centerX, centerY;
102 double newWidth =
width() * scaleFactor;
103 double newHeight =
height() * scaleFactor;
104 xmin = centerX - newWidth / 2.0;
105 xmax = centerX + newWidth / 2.0;
106 ymin = centerY - newHeight / 2.0;
107 ymax = centerY + newHeight / 2.0;
113 double centerX, centerY;
125 double newWidth =
width() * scaleFactor;
126 double newHeight =
height() * scaleFactor;
127 xmin = centerX - newWidth;
128 xmax = centerX + newWidth;
129 ymin = centerY - newHeight;
130 ymax = centerY + newHeight;
153 if ( x1 > x2 )
return false;
156 if ( y1 > y2 )
return false;
201 QString::number(
xmin,
'f', 16 ) +
" " +
202 QString::number(
ymin,
'f', 16 ) +
", " +
203 QString::number(
xmax,
'f', 16 ) +
" " +
204 QString::number(
ymax,
'f', 16 );
212 if ( automaticPrecision )
217 precision =
static_cast<int>( ceil( -1.0 * log10( qMin(
width(),
height() ) ) ) ) + 1;
219 if ( precision > 20 )
236 rep = QString(
"%1,%2 : %3,%4" )
237 .arg(
xmin, 0,
'f', thePrecision )
238 .arg(
ymin, 0,
'f', thePrecision )
239 .arg(
xmax, 0,
'f', thePrecision )
240 .arg(
ymax, 0,
'f', thePrecision );
255 QTextStream foo( &rep );
257 foo.setRealNumberPrecision( 8 );
258 foo.setRealNumberNotation( QTextStream::FixedNotation );
283 return ( !
operator==( r1 ) );