QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
QgsRectangle Class Reference

A rectangle specified with double values. More...

#include <qgsrectangle.h>

Public Member Functions

 QgsRectangle (double xmin=0, double ymin=0, double xmax=0, double ymax=0)
 Constructor. More...
 
 QgsRectangle (const QgsPoint &p1, const QgsPoint &p2)
 Construct a rectangle from two points. The rectangle is normalized after construction. More...
 
 QgsRectangle (const QRectF &qRectF)
 Construct a rectangle from a QRectF. More...
 
 QgsRectangle (const QgsRectangle &other)
 Copy constructor. More...
 
 ~QgsRectangle ()
 Destructor. More...
 
void set (const QgsPoint &p1, const QgsPoint &p2)
 Set the rectangle from two QgsPoints. More...
 
void set (double xmin, double ymin, double xmax, double ymax)
 Set the rectangle from four points. More...
 
void setXMinimum (double x)
 Set the minimum x value. More...
 
void setXMaximum (double x)
 Set the maximum x value. More...
 
void setYMinimum (double y)
 Set the minimum y value. More...
 
void setYMaximum (double y)
 Set the maximum y value. More...
 
void setMinimal ()
 Set a rectangle so that min corner is at max and max corner is at min. More...
 
double xMaximum () const
 Get the x maximum value (right side of rectangle) More...
 
double xMinimum () const
 Get the x minimum value (left side of rectangle) More...
 
double yMaximum () const
 Get the y maximum value (top side of rectangle) More...
 
double yMinimum () const
 Get the y minimum value (bottom side of rectangle) More...
 
void normalize ()
 Normalize the rectangle so it has non-negative width/height. More...
 
double width () const
 Width of the rectangle. More...
 
double height () const
 Height of the rectangle. More...
 
QgsPoint center () const
 Center point of the rectangle. More...
 
void scale (double scaleFactor, const QgsPoint *c=0)
 Scale the rectangle around its center point. More...
 
void scale (double scaleFactor, double centerX, double centerY)
 
QgsRectangle buffer (double width)
 Get rectangle enlarged by buffer. More...
 
QgsRectangle intersect (const QgsRectangle *rect) const
 return the intersection with the given rectangle More...
 
bool intersects (const QgsRectangle &rect) const
 returns true when rectangle intersects with other rectangle More...
 
bool contains (const QgsRectangle &rect) const
 return true when rectangle contains other rectangle More...
 
bool contains (const QgsPoint &p) const
 return true when rectangle contains a point More...
 
void combineExtentWith (QgsRectangle *rect)
 expand the rectangle so that covers both the original rectangle and the given rectangle More...
 
void combineExtentWith (double x, double y)
 expand the rectangle so that covers both the original rectangle and the given point More...
 
bool isEmpty () const
 test if rectangle is empty. More...
 
bool isNull () const
 test if the rectangle is null (all coordinates zero or after call to setMinimal()). More...
 
QString asWktCoordinates () const
 returns string representation in Wkt form More...
 
QString asWktPolygon () const
 returns string representation as WKT Polygon More...
 
QRectF toRectF () const
 returns a QRectF with same coordinates. More...
 
QString toString (bool automaticPrecision=false) const
 returns string representation of form xmin,ymin xmax,ymax More...
 
QString toString (int thePrecision) const
 overloaded toString that allows precision of numbers to be set More...
 
QString asPolygon () const
 returns rectangle as a polygon More...
 
bool operator== (const QgsRectangle &r1) const
 
bool operator!= (const QgsRectangle &r1) const
 
QgsRectangleoperator= (const QgsRectangle &r1)
 
void unionRect (const QgsRectangle &rect)
 updates rectangle to include passed argument More...
 
bool isFinite () const
 Returns true if the rectangle has finite boundaries. More...
 
void invert ()
 swap x/y More...
 

Protected Attributes

double xmin
 
double ymin
 
double xmax
 
double ymax
 

Detailed Description

A rectangle specified with double values.

QgsRectangle is used to store a rectangle when double values are required. Examples are storing a layer extent or the current view extent of a map

Definition at line 35 of file qgsrectangle.h.

Constructor & Destructor Documentation

QgsRectangle::QgsRectangle ( double  xmin = 0,
double  ymin = 0,
double  xmax = 0,
double  ymax = 0 
)

Constructor.

Definition at line 31 of file qgsrectangle.cpp.

References normalize().

Referenced by buffer(), and intersect().

QgsRectangle::QgsRectangle ( const QgsPoint p1,
const QgsPoint p2 
)

Construct a rectangle from two points. The rectangle is normalized after construction.

Definition at line 37 of file qgsrectangle.cpp.

References set().

QgsRectangle::QgsRectangle ( const QRectF &  qRectF)

Construct a rectangle from a QRectF.

The rectangle is normalized after construction.

Note
added in 2.0

Definition at line 42 of file qgsrectangle.cpp.

References xmax, xmin, ymax, and ymin.

QgsRectangle::QgsRectangle ( const QgsRectangle other)

Copy constructor.

Definition at line 50 of file qgsrectangle.cpp.

References xmax, xMaximum(), xmin, xMinimum(), ymax, yMaximum(), ymin, and yMinimum().

QgsRectangle::~QgsRectangle ( )
inline

Destructor.

Definition at line 160 of file qgsrectangle.h.

Member Function Documentation

QString QgsRectangle::asPolygon ( ) const

returns rectangle as a polygon

Definition at line 275 of file qgsrectangle.cpp.

References xmax, xmin, ymax, and ymin.

QString QgsRectangle::asWktCoordinates ( ) const

returns string representation in Wkt form

Definition at line 205 of file qgsrectangle.cpp.

References qgsDoubleToString(), xmax, xmin, ymax, and ymin.

QString QgsRectangle::asWktPolygon ( ) const

returns string representation as WKT Polygon

Note
added in 2.0

Definition at line 214 of file qgsrectangle.cpp.

References qgsDoubleToString(), xmax, xmin, ymax, and ymin.

QgsRectangle QgsRectangle::buffer ( double  width)

Get rectangle enlarged by buffer.

Note
added in 2.1

Definition at line 125 of file qgsrectangle.cpp.

References QgsRectangle(), xmax, xmin, ymax, and ymin.

QgsPoint QgsRectangle::center ( ) const
inline
void QgsRectangle::combineExtentWith ( QgsRectangle rect)
void QgsRectangle::combineExtentWith ( double  x,
double  y 
)

expand the rectangle so that covers both the original rectangle and the given point

Definition at line 181 of file qgsrectangle.cpp.

References xmax, xmin, ymax, and ymin.

bool QgsRectangle::contains ( const QgsRectangle rect) const
bool QgsRectangle::contains ( const QgsPoint p) const

return true when rectangle contains a point

Note
added in version 1.3

Definition at line 164 of file qgsrectangle.cpp.

References QgsPoint::x(), xmax, xmin, QgsPoint::y(), ymax, and ymin.

double QgsRectangle::height ( ) const
inline

Height of the rectangle.

Definition at line 209 of file qgsrectangle.h.

References ymax, and ymin.

Referenced by QgsFeatureRendererV2::_getLineString(), QgsFeatureRendererV2::_getPolygon(), QgsPointSample::addSamplePoints(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterInterface::bandStatistics(), QgsRasterDataProvider::block(), QgsVectorLayer::boundingBoxOfSelected(), QgsComposerMap::cache(), QgsRasterProjector::calc(), QgsRasterProjector::calcSrcRowsCols(), QgsMapToolZoom::canvasReleaseEvent(), center(), QgsComposerMap::composerMapPosForItem(), QgsComposition::computeWorldFileParameters(), QgsRasterProjector::destPointOnCPMatrix(), fcnBoundsHeight(), QgsMapSettings::fullExtent(), QgsRasterFileWriter::globalOutputParameters(), QgsRasterInterface::histogram(), QgsRasterDataProvider::identify(), QgsMapToolIdentify::identifyRasterLayer(), QgsRasterInterface::initHistogram(), QgsRasterInterface::initStatistics(), QgsMapOverviewCanvas::mouseReleaseEvent(), QgsRasterCalculator::outputGeoTransform(), QgsComposerMapOverview::overviewExtentChanged(), QgsComposerMap::paint(), QgsAtlasComposition::prepareMap(), QgsRasterLayer::previewAsImage(), QgsRasterLayer::previewAsPixmap(), QgsDxfPalLabeling::QgsDxfPalLabeling(), QgsRasterLayer::rasterUnitsPerPixelY(), QgsRasterIterator::readNextRasterPart(), QgsRasterLayerSaveAsDialog::recalcResolution(), QgsRasterLayerSaveAsDialog::recalcSize(), QgsComposerMap::refreshMapExtents(), scale(), QgsMapRenderer::setExtent(), QgsMapCanvas::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsComposerMap::setNewExtent(), QgsRasterLayerSaveAsDialog::setOriginalResolution(), QgsVectorLayerEditUtils::splitFeatures(), QgsVectorLayerEditUtils::splitParts(), QgsRasterBlock::subRect(), toString(), QgsCoordinateTransform::transformBoundingBox(), QgsMapSettings::updateDerived(), and QgsMapRenderer::updateFullExtent().

QgsRectangle QgsRectangle::intersect ( const QgsRectangle rect) const
bool QgsRectangle::intersects ( const QgsRectangle rect) const

returns true when rectangle intersects with other rectangle

Definition at line 146 of file qgsrectangle.cpp.

References xmax, xmin, ymax, and ymin.

Referenced by intersect(), and QgsVectorLayer::snapWithContext().

void QgsRectangle::invert ( )

swap x/y

Note
added in 1.9

Definition at line 353 of file qgsrectangle.cpp.

References xmax, xmin, ymax, and ymin.

bool QgsRectangle::isEmpty ( ) const

test if rectangle is empty.

Empty rectangle may still be non-null if it contains valid information (e.g. bounding box of a point)

Definition at line 192 of file qgsrectangle.cpp.

References xmax, xmin, ymax, and ymin.

Referenced by QgsPointSample::addSamplePoints(), QgsRasterDataProvider::block(), QgsRasterProjector::calc(), QgsRasterProjector::calcSrcExtent(), QgsZonalStatistics::calculateStatistics(), QgsZonalStatistics::cellInfoForBBox(), QgsMapOverviewCanvas::drawExtentRect(), QgsDxfExport::dxfExtent(), QgsGml::endElement(), QgsComposerAttributeTable::getFeatureAttributes(), QgsGml::getFeatures(), QgsRasterDataProvider::identify(), QgsRasterInterface::initHistogram(), QgsRasterInterface::initStatistics(), QgsVectorLayer::metadata(), QgsRasterMinMaxWidget::on_mLoadPushButton_clicked(), QgsAtlasComposition::prepareMap(), QgsRasterLayerRenderer::QgsRasterLayerRenderer(), QgsRasterCalculator::readRasterPart(), QgsVectorLayerRenderer::render(), QgsMapRenderer::render(), QgsRasterLayer::setContrastEnhancement(), QgsMapCanvas::setDestinationCrs(), QgsMapRenderer::setDestinationCrs(), QgsMapRenderer::setExtent(), QgsMapCanvas::setExtent(), QgsMapCanvasItem::setRect(), QgsVectorLayerEditUtils::splitFeatures(), QgsVectorLayerEditUtils::splitParts(), toString(), QgsCoordinateTransform::transformBoundingBox(), QgsMapSettings::updateDerived(), QgsHighlight::updateRect(), QgsDxfExport::writeEntities(), QgsDxfExport::writeEntitiesSymbolLevels(), QgsDxfExport::writeHeader(), QgsDxfExport::writeHeaderAC1018(), QgsMapCanvas::zoomToFullExtent(), QgsLayerTreeViewDefaultActions::zoomToLayers(), and QgsMapCanvas::zoomToSelected().

bool QgsRectangle::isFinite ( ) const

Returns true if the rectangle has finite boundaries.

Will return false if any of the rectangle boundaries are NaN or Inf.

Definition at line 340 of file qgsrectangle.cpp.

References xmax, xmin, ymax, and ymin.

Referenced by QgsMapRendererJob::prepareJobs(), QgsVectorLayerRenderer::render(), QgsMapRenderer::render(), and QgsMapSettings::updateDerived().

bool QgsRectangle::isNull ( ) const

test if the rectangle is null (all coordinates zero or after call to setMinimal()).

Null rectangle is also an empty rectangle.

Note
added in 2.4

Definition at line 197 of file qgsrectangle.cpp.

References pal::max(), xmax, xmin, ymax, and ymin.

Referenced by QgsMapSettings::fullExtent(), QgsMapRenderer::updateFullExtent(), and QgsLayerTreeViewDefaultActions::zoomToLayers().

void QgsRectangle::normalize ( )
bool QgsRectangle::operator!= ( const QgsRectangle r1) const

Comparison operator

Returns
False if rectangles are equal

Definition at line 308 of file qgsrectangle.cpp.

QgsRectangle & QgsRectangle::operator= ( const QgsRectangle r1)

Assignment operator

Parameters
r1QgsRectangle to assign from

Definition at line 314 of file qgsrectangle.cpp.

References xmax, xMaximum(), xmin, xMinimum(), ymax, yMaximum(), ymin, and yMinimum().

bool QgsRectangle::operator== ( const QgsRectangle r1) const

Comparison operator

Returns
True if rectangles are equal

Definition at line 299 of file qgsrectangle.cpp.

References xMaximum(), xMinimum(), yMaximum(), and yMinimum().

void QgsRectangle::scale ( double  scaleFactor,
const QgsPoint c = 0 
)
void QgsRectangle::scale ( double  scaleFactor,
double  centerX,
double  centerY 
)

Definition at line 115 of file qgsrectangle.cpp.

References height(), width(), xmax, xmin, ymax, and ymin.

void QgsRectangle::set ( const QgsPoint p1,
const QgsPoint p2 
)
void QgsRectangle::set ( double  xmin,
double  ymin,
double  xmax,
double  ymax 
)

Set the rectangle from four points.

The rectangle is normalised after construction.

Definition at line 68 of file qgsrectangle.cpp.

References normalize(), xmax, xmin, ymax, and ymin.

void QgsRectangle::setMinimal ( )
void QgsRectangle::setXMaximum ( double  x)
inline
void QgsRectangle::setXMinimum ( double  x)
inline
void QgsRectangle::setYMaximum ( double  y)
inline
void QgsRectangle::setYMinimum ( double  y)
inline
QRectF QgsRectangle::toRectF ( ) const

returns a QRectF with same coordinates.

Note
added in 2.0

Definition at line 230 of file qgsrectangle.cpp.

References xmax, xmin, ymax, and ymin.

Referenced by QgsComposerView::endMarqueeZoom(), QgsComposerView::mousePressEvent(), and QgsComposerView::mouseReleaseEvent().

QString QgsRectangle::toString ( bool  automaticPrecision = false) const
QString QgsRectangle::toString ( int  thePrecision) const

overloaded toString that allows precision of numbers to be set

Definition at line 256 of file qgsrectangle.cpp.

References isEmpty(), QgsDebugMsgLevel, xmax, xmin, ymax, and ymin.

void QgsRectangle::unionRect ( const QgsRectangle rect)
double QgsRectangle::width ( ) const
inline

Width of the rectangle.

Definition at line 204 of file qgsrectangle.h.

References xmax, and xmin.

Referenced by QgsFeatureRendererV2::_getLineString(), QgsFeatureRendererV2::_getPolygon(), QgsPointSample::addSamplePoints(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterInterface::bandStatistics(), QgsRasterResampleFilter::block(), QgsRasterDataProvider::block(), QgsVectorLayer::boundingBoxOfSelected(), QgsComposerMap::cache(), QgsRasterProjector::calc(), QgsRasterProjector::calcSrcRowsCols(), QgsMapToolZoom::canvasReleaseEvent(), center(), QgsComposerMap::composerMapPosForItem(), QgsComposition::computeWorldFileParameters(), QgsRasterFileWriter::createPartProvider(), QgsRasterProjector::destPointOnCPMatrix(), fcnBoundsWidth(), QgsMapSettings::fullExtent(), QgsRasterFileWriter::globalOutputParameters(), QgsRasterInterface::histogram(), QgsRasterDataProvider::identify(), QgsMapToolIdentify::identifyRasterLayer(), QgsRasterInterface::initHistogram(), QgsRasterInterface::initStatistics(), QgsComposerMap::mapUnitsToMM(), QgsComposerScaleBar::mapWidth(), QgsMapOverviewCanvas::mouseReleaseEvent(), QgsRasterCalculator::outputGeoTransform(), QgsComposerMapOverview::overviewExtentChanged(), QgsComposerMap::paint(), QgsHighlight::paintPoint(), QgsAtlasComposition::prepareMap(), QgsRasterLayer::previewAsImage(), QgsRasterLayer::previewAsPixmap(), QgsDxfPalLabeling::QgsDxfPalLabeling(), QgsRasterLayer::rasterUnitsPerPixelX(), QgsRasterIterator::readNextRasterPart(), QgsRasterLayerSaveAsDialog::recalcResolution(), QgsRasterLayerSaveAsDialog::recalcSize(), QgsComposerMap::refreshMapExtents(), scale(), QgsMapRenderer::setExtent(), QgsMapCanvas::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsComposerMap::setNewExtent(), QgsRasterLayerSaveAsDialog::setOriginalResolution(), QgsComposerMap::setSceneRect(), QgsVectorLayerEditUtils::splitFeatures(), QgsVectorLayerEditUtils::splitParts(), QgsRasterBlock::subRect(), toString(), QgsCoordinateTransform::transformBoundingBox(), QgsMapSettings::updateDerived(), QgsMapRenderer::updateFullExtent(), and QgsHighlight::updateRect().

double QgsRectangle::xMaximum ( ) const
inline

Get the x maximum value (right side of rectangle)

Definition at line 184 of file qgsrectangle.h.

References xmax.

Referenced by QgsFeatureRendererV2::_getLineString(), QgsFeatureRendererV2::_getPolygon(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterDataProvider::block(), QgsVectorLayer::boundingBoxOfSelected(), QgsRasterProjector::calcSrcExtent(), QgsScaleCalculator::calculate(), QgsScaleCalculator::calculateGeographicDistance(), QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox(), QgsMapToPixelSimplifier::canbeGeneralizedByMapBoundingBox(), QgsZonalStatistics::cellInfoForBBox(), QgsClipper::clippedLineWKB(), combineExtentWith(), QgsClipper::connectSeparatedLines(), QgsMapOverviewCanvas::drawExtentRect(), QgsPalLabeling::drawLabeling(), QgsVectorLayer::extent(), fcnXMax(), QgsGeometry::fromRect(), QgsMapSettings::fullExtent(), generalizeWkbGeometry(), intersect(), QgsClipper::intersectRect(), QgsMapCanvas::keyPressEvent(), QgsLabelSearchTree::labelsInRect(), QgsComposerMap::mapPolygon(), QgsComposerMap::mapToItemCoords(), QgsComposerScaleBar::mapWidth(), QgsVectorLayer::metadata(), operator=(), operator==(), QgsComposerMap::paint(), QgsAtlasComposition::prepareMap(), QgsRasterLayerRenderer::QgsRasterLayerRenderer(), QgsRectangle(), QgsOSMDownload::queryFromRect(), QgsRasterCalculator::readRasterPart(), QgsOgcUtils::rectangleToGMLBox(), QgsOgcUtils::rectangleToGMLEnvelope(), QgsSpatialIndex::rectToRegion(), QgsComposerMap::refreshMapExtents(), QgsVectorLayerRenderer::render(), QgsMapRendererJob::reprojectToLayerExtent(), QgsMapRenderer::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsExtentGroupBox::setOutputExtent(), QgsMapCanvasItem::setRect(), QgsComposerMap::setSceneRect(), QgsMapToPixelSimplifier::simplifyWkbGeometry(), QgsVectorLayerEditUtils::splitFeatures(), QgsMapRenderer::splitLayersExtent(), QgsVectorLayerEditUtils::splitParts(), QgsRasterBlock::subRect(), QgsCoordinateTransform::transform(), QgsClipper::trimPolygon(), unionRect(), QgsMapSettings::updateDerived(), QgsMapRenderer::updateFullExtent(), QgsHighlight::updateRect(), QgsDxfExport::writeHeader(), QgsDxfExport::writeHeaderAC1018(), QgsXmlUtils::writeRectangle(), QgsComposerMap::writeXML(), QgsComposerMapGrid::xGridLinesCRSTransform(), QgsComposerMapGrid::yGridLinesCRSTransform(), and QgsComposerMap::zoomContent().

double QgsRectangle::xMinimum ( ) const
inline

Get the x minimum value (left side of rectangle)

Definition at line 189 of file qgsrectangle.h.

References xmin.

Referenced by QgsFeatureRendererV2::_getLineString(), QgsFeatureRendererV2::_getPolygon(), QgsPointSample::addSamplePoints(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterProjector::approximateSrcRowCol(), QgsRasterInterface::bandStatistics(), QgsRasterDataProvider::block(), QgsVectorLayer::boundingBoxOfSelected(), QgsRasterProjector::calcHelper(), QgsRasterProjector::calcSrcExtent(), QgsScaleCalculator::calculate(), QgsScaleCalculator::calculateGeographicDistance(), QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox(), QgsMapToPixelSimplifier::canbeGeneralizedByMapBoundingBox(), QgsZonalStatistics::cellInfoForBBox(), QgsClipper::clippedLineWKB(), combineExtentWith(), QgsComposerMap::composerMapPosForItem(), QgsComposition::computeWorldFileParameters(), QgsClipper::connectSeparatedLines(), QgsRasterFileWriter::createPartProvider(), QgsRasterProjector::destPointOnCPMatrix(), QgsMapOverviewCanvas::drawExtentRect(), QgsPalLabeling::drawLabeling(), QgsGeometryAnalyzer::extent(), QgsVectorLayer::extent(), fcnXMin(), QgsGeometry::fromRect(), QgsMapSettings::fullExtent(), generalizeWkbGeometry(), QgsRasterFileWriter::globalOutputParameters(), QgsRasterInterface::histogram(), QgsRasterDataProvider::identify(), intersect(), QgsClipper::intersectRect(), QgsMapCanvas::keyPressEvent(), QgsLabelSearchTree::labelsInRect(), QgsComposerMap::mapPolygon(), QgsComposerMap::mapToItemCoords(), QgsComposerScaleBar::mapWidth(), QgsVectorLayer::metadata(), operator=(), operator==(), QgsRasterCalculator::outputGeoTransform(), QgsComposerMap::paint(), QgsRasterProjector::preciseSrcRowCol(), QgsAtlasComposition::prepareMap(), QgsDxfPalLabeling::QgsDxfPalLabeling(), QgsRasterLayerRenderer::QgsRasterLayerRenderer(), QgsRectangle(), QgsOSMDownload::queryFromRect(), QgsRasterIterator::readNextRasterPart(), QgsRasterCalculator::readRasterPart(), QgsOgcUtils::rectangleToGMLBox(), QgsOgcUtils::rectangleToGMLEnvelope(), QgsSpatialIndex::rectToRegion(), QgsComposerMap::refreshMapExtents(), QgsVectorLayerRenderer::render(), QgsMapRendererJob::reprojectToLayerExtent(), QgsRenderChecker::runTest(), QgsMapCanvas::saveAsImage(), QgsMapRenderer::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsExtentGroupBox::setOutputExtent(), QgsMapCanvasItem::setRect(), QgsComposerMap::setSceneRect(), QgsMapToPixelSimplifier::simplifyWkbGeometry(), QgsVectorLayerEditUtils::splitFeatures(), QgsMapRenderer::splitLayersExtent(), QgsVectorLayerEditUtils::splitParts(), QgsZonalStatistics::statisticsFromMiddlePointTest(), QgsZonalStatistics::statisticsFromPreciseIntersection(), QgsRasterBlock::subRect(), QgsCoordinateTransform::transform(), QgsCoordinateTransform::transformBoundingBox(), QgsClipper::trimPolygon(), unionRect(), QgsMapSettings::updateDerived(), QgsMapRenderer::updateFullExtent(), QgsHighlight::updateRect(), QgsGridFileWriter::writeFile(), QgsGridFileWriter::writeHeader(), QgsDxfExport::writeHeader(), QgsDxfExport::writeHeaderAC1018(), QgsXmlUtils::writeRectangle(), QgsComposerMap::writeXML(), QgsComposerMapGrid::xGridLinesCRSTransform(), QgsComposerMapGrid::yGridLinesCRSTransform(), and QgsComposerMap::zoomContent().

double QgsRectangle::yMaximum ( ) const
inline

Get the y maximum value (top side of rectangle)

Definition at line 194 of file qgsrectangle.h.

References ymax.

Referenced by QgsFeatureRendererV2::_getLineString(), QgsFeatureRendererV2::_getPolygon(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterProjector::approximateSrcRowCol(), QgsRasterInterface::bandStatistics(), QgsRasterDataProvider::block(), QgsVectorLayer::boundingBoxOfSelected(), QgsRasterProjector::calcSrcExtent(), QgsScaleCalculator::calculateGeographicDistance(), QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox(), QgsMapToPixelSimplifier::canbeGeneralizedByMapBoundingBox(), QgsZonalStatistics::cellInfoForBBox(), QgsClipper::clippedLineWKB(), combineExtentWith(), QgsComposerMap::composerMapPosForItem(), QgsComposition::computeWorldFileParameters(), QgsClipper::connectSeparatedLines(), QgsRasterFileWriter::createPartProvider(), QgsRasterProjector::destPointOnCPMatrix(), QgsMapOverviewCanvas::drawExtentRect(), QgsPalLabeling::drawLabeling(), QgsVectorLayer::extent(), fcnYMax(), QgsGeometry::fromRect(), QgsMapSettings::fullExtent(), generalizeWkbGeometry(), QgsRasterFileWriter::globalOutputParameters(), QgsRasterInterface::histogram(), QgsRasterDataProvider::identify(), intersect(), QgsClipper::intersectRect(), QgsMapCanvas::keyPressEvent(), QgsLabelSearchTree::labelsInRect(), QgsComposerMap::mapPolygon(), QgsComposerMap::mapToItemCoords(), QgsVectorLayer::metadata(), operator=(), operator==(), QgsRasterCalculator::outputGeoTransform(), QgsComposerMap::paint(), QgsRasterProjector::preciseSrcRowCol(), QgsAtlasComposition::prepareMap(), QgsRasterLayerRenderer::QgsRasterLayerRenderer(), QgsRectangle(), QgsOSMDownload::queryFromRect(), QgsRasterIterator::readNextRasterPart(), QgsRasterCalculator::readRasterPart(), QgsOgcUtils::rectangleToGMLBox(), QgsOgcUtils::rectangleToGMLEnvelope(), QgsSpatialIndex::rectToRegion(), QgsComposerMap::refreshMapExtents(), QgsVectorLayerRenderer::render(), QgsMapRendererJob::reprojectToLayerExtent(), QgsRenderChecker::runTest(), QgsMapCanvas::saveAsImage(), QgsMapRenderer::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsExtentGroupBox::setOutputExtent(), QgsMapCanvasItem::setRect(), QgsMapToPixelSimplifier::simplifyWkbGeometry(), QgsVectorLayerEditUtils::splitFeatures(), QgsMapRenderer::splitLayersExtent(), QgsVectorLayerEditUtils::splitParts(), QgsZonalStatistics::statisticsFromMiddlePointTest(), QgsZonalStatistics::statisticsFromPreciseIntersection(), QgsRasterBlock::subRect(), QgsCoordinateTransform::transform(), QgsClipper::trimPolygon(), unionRect(), QgsMapSettings::updateDerived(), QgsMapRenderer::updateFullExtent(), QgsHighlight::updateRect(), QgsGridFileWriter::writeFile(), QgsDxfExport::writeHeader(), QgsDxfExport::writeHeaderAC1018(), QgsXmlUtils::writeRectangle(), QgsComposerMap::writeXML(), QgsComposerMapGrid::xGridLinesCRSTransform(), QgsComposerMapGrid::yGridLinesCRSTransform(), and QgsComposerMap::zoomContent().

double QgsRectangle::yMinimum ( ) const
inline

Get the y minimum value (bottom side of rectangle)

Definition at line 199 of file qgsrectangle.h.

References ymin.

Referenced by QgsFeatureRendererV2::_getLineString(), QgsFeatureRendererV2::_getPolygon(), QgsPointSample::addSamplePoints(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterDataProvider::block(), QgsVectorLayer::boundingBoxOfSelected(), QgsRasterProjector::calcSrcExtent(), QgsScaleCalculator::calculateGeographicDistance(), QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox(), QgsMapToPixelSimplifier::canbeGeneralizedByMapBoundingBox(), QgsZonalStatistics::cellInfoForBBox(), QgsClipper::clippedLineWKB(), combineExtentWith(), QgsComposition::computeWorldFileParameters(), QgsClipper::connectSeparatedLines(), QgsMapOverviewCanvas::drawExtentRect(), QgsPalLabeling::drawLabeling(), QgsVectorLayer::extent(), fcnYMin(), QgsGeometry::fromRect(), QgsMapSettings::fullExtent(), generalizeWkbGeometry(), intersect(), QgsClipper::intersectRect(), QgsMapCanvas::keyPressEvent(), QgsLabelSearchTree::labelsInRect(), QgsComposerMap::mapPolygon(), QgsComposerMap::mapToItemCoords(), QgsComposerScaleBar::mapWidth(), QgsVectorLayer::metadata(), operator=(), operator==(), QgsComposerMap::paint(), QgsRasterProjector::preciseSrcRowCol(), QgsAtlasComposition::prepareMap(), QgsDxfPalLabeling::QgsDxfPalLabeling(), QgsRasterLayerRenderer::QgsRasterLayerRenderer(), QgsRectangle(), QgsOSMDownload::queryFromRect(), QgsRasterCalculator::readRasterPart(), QgsOgcUtils::rectangleToGMLBox(), QgsOgcUtils::rectangleToGMLEnvelope(), QgsSpatialIndex::rectToRegion(), QgsComposerMap::refreshMapExtents(), QgsVectorLayerRenderer::render(), QgsMapRendererJob::reprojectToLayerExtent(), QgsMapRenderer::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsExtentGroupBox::setOutputExtent(), QgsMapCanvasItem::setRect(), QgsComposerMap::setSceneRect(), QgsMapToPixelSimplifier::simplifyWkbGeometry(), QgsVectorLayerEditUtils::splitFeatures(), QgsMapRenderer::splitLayersExtent(), QgsVectorLayerEditUtils::splitParts(), QgsRasterBlock::subRect(), QgsCoordinateTransform::transform(), QgsCoordinateTransform::transformBoundingBox(), QgsClipper::trimPolygon(), unionRect(), QgsMapSettings::updateDerived(), QgsMapRenderer::updateFullExtent(), QgsHighlight::updateRect(), QgsGridFileWriter::writeHeader(), QgsDxfExport::writeHeader(), QgsDxfExport::writeHeaderAC1018(), QgsXmlUtils::writeRectangle(), QgsComposerMap::writeXML(), QgsComposerMapGrid::xGridLinesCRSTransform(), QgsComposerMapGrid::yGridLinesCRSTransform(), and QgsComposerMap::zoomContent().

Member Data Documentation

double QgsRectangle::xmax
protected
double QgsRectangle::xmin
protected
double QgsRectangle::ymax
protected
double QgsRectangle::ymin
protected

The documentation for this class was generated from the following files: