18 #ifndef QGSRECTANGLE_H
19 #define QGSRECTANGLE_H
22 #include <QDomDocument>
39 QgsRectangle(
double xmin = 0,
double ymin = 0,
double xmax = 0,
double ymax = 0 );
53 void set(
double xmin,
double ymin,
double xmax,
double ymax );
55 void setXMinimum(
double x );
57 void setXMaximum(
double x );
59 void setYMinimum(
double y );
61 void setYMaximum(
double y );
66 double xMaximum()
const;
68 double xMinimum()
const;
70 double yMaximum()
const;
72 double yMinimum()
const;
78 double height()
const;
82 void scale(
double scaleFactor,
const QgsPoint *c = 0 );
83 void scale(
double scaleFactor,
double centerX,
double centerY );
94 bool contains(
const QgsPoint &p )
const;
98 void combineExtentWith(
double x,
double y );
101 bool isEmpty()
const;
107 QString asWktCoordinates()
const;
113 QString toString(
bool automaticPrecision =
false )
const;
115 QString toString(
int thePrecision )
const;
136 bool isFinite()
const;
221 #endif // QGSRECTANGLE_H
A rectangle specified with double values.
void setXMaximum(double x)
Set the maximum x value.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
double yMaximum() const
Get the y maximum value (top side of rectangle)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
~QgsRectangle()
Destructor.
CORE_EXPORT QDataStream & operator<<(QDataStream &out, const QgsRectangle &rectangle)
Writes the list rectangle to stream out.
double yMinimum() const
Get the y minimum value (bottom side of rectangle)
double xMaximum() const
Get the x maximum value (right side of rectangle)
void setYMinimum(double y)
Set the minimum y value.
A class to represent a point.
QByteArray toLocal8Bit() const
CORE_EXPORT QDataStream & operator>>(QDataStream &in, QgsRectangle &rectangle)
Reads a rectangle from stream in into rectangle.
void setYMaximum(double y)
Set the maximum y value.
double width() const
Width of the rectangle.
QString toString(bool automaticPrecision=false) const
returns string representation of form xmin,ymin xmax,ymax
double xMinimum() const
Get the x minimum value (left side of rectangle)
QgsPoint center() const
Center point of the rectangle.
bool isNull(const QVariant &v)
void setXMinimum(double x)
Set the minimum x value.
double height() const
Height of the rectangle.