QGIS API Documentation
2.2.0-Valmiera
|
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. | |
QgsRectangle (const QgsPoint &p1, const QgsPoint &p2) | |
Construct a rectangle from two points. The rectangle is normalized after construction. | |
QgsRectangle (const QRectF &qRectF) | |
Construct a rectangle from a QRectF. | |
QgsRectangle (const QgsRectangle &other) | |
Copy constructor. | |
~QgsRectangle () | |
Destructor. | |
void | set (const QgsPoint &p1, const QgsPoint &p2) |
Set the rectangle from two QgsPoints. | |
void | set (double xmin, double ymin, double xmax, double ymax) |
Set the rectangle from four points. | |
void | setXMinimum (double x) |
Set the minimum x value. | |
void | setXMaximum (double x) |
Set the maximum x value. | |
void | setYMinimum (double y) |
Set the minimum y value. | |
void | setYMaximum (double y) |
Set the maximum y value. | |
void | setMinimal () |
Set a rectangle so that min corner is at max and max corner is at min. | |
double | xMaximum () const |
Get the x maximum value (right side of rectangle) | |
double | xMinimum () const |
Get the x minimum value (left side of rectangle) | |
double | yMaximum () const |
Get the y maximum value (top side of rectangle) | |
double | yMinimum () const |
Get the y minimum value (bottom side of rectangle) | |
void | normalize () |
Normalize the rectangle so it has non-negative width/height. | |
double | width () const |
Width of the rectangle. | |
double | height () const |
Height of the rectangle. | |
QgsPoint | center () const |
Center point of the rectangle. | |
void | scale (double scaleFactor, const QgsPoint *c=0) |
Scale the rectangle around its center point. | |
void | scale (double scaleFactor, double centerX, double centerY) |
QgsRectangle | buffer (double width) |
Get rectangle enlarged by buffer. | |
QgsRectangle | intersect (const QgsRectangle *rect) const |
return the intersection with the given rectangle | |
bool | intersects (const QgsRectangle &rect) const |
returns true when rectangle intersects with other rectangle | |
bool | contains (const QgsRectangle &rect) const |
return true when rectangle contains other rectangle | |
bool | contains (const QgsPoint &p) const |
return true when rectangle contains a point | |
void | combineExtentWith (QgsRectangle *rect) |
expand the rectangle so that covers both the original rectangle and the given rectangle | |
void | combineExtentWith (double x, double y) |
expand the rectangle so that covers both the original rectangle and the given point | |
bool | isEmpty () const |
test if rectangle is empty | |
QString | asWktCoordinates () const |
returns string representation in Wkt form | |
QString | asWktPolygon () const |
returns string representation as WKT Polygon | |
QRectF | toRectF () const |
returns a QRectF with same coordinates. | |
QString | toString (bool automaticPrecision=false) const |
returns string representation of form xmin,ymin xmax,ymax | |
QString | toString (int thePrecision) const |
overloaded toString that allows precision of numbers to be set | |
QString | asPolygon () const |
returns rectangle as a polygon | |
bool | operator== (const QgsRectangle &r1) const |
bool | operator!= (const QgsRectangle &r1) const |
QgsRectangle & | operator= (const QgsRectangle &r1) |
void | unionRect (const QgsRectangle &rect) |
updates rectangle to include passed argument | |
bool | isFinite () const |
Returns true if the rectangle has finite boundaries. | |
void | invert () |
swap x/y |
Protected Attributes | |
double | xmin |
double | ymin |
double | xmax |
double | ymax |
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.
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().
Construct a rectangle from two points. The rectangle is normalized after construction.
Definition at line 37 of file qgsrectangle.cpp.
QgsRectangle::QgsRectangle | ( | const QRectF & | qRectF | ) |
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().
|
inline |
Destructor.
Definition at line 155 of file qgsrectangle.h.
QString QgsRectangle::asPolygon | ( | ) | const |
QString QgsRectangle::asWktCoordinates | ( | ) | const |
returns string representation in Wkt form
Definition at line 197 of file qgsrectangle.cpp.
References qgsDoubleToString(), xmax, xmin, ymax, and ymin.
QString QgsRectangle::asWktPolygon | ( | ) | const |
returns string representation as WKT Polygon
Definition at line 206 of file qgsrectangle.cpp.
References qgsDoubleToString(), xmax, xmin, ymax, and ymin.
QgsRectangle QgsRectangle::buffer | ( | double | width | ) |
Get rectangle enlarged by buffer.
Definition at line 125 of file qgsrectangle.cpp.
References QgsRectangle(), xmax, xmin, ymax, and ymin.
|
inline |
Center point of the rectangle.
Definition at line 209 of file qgsrectangle.h.
References height(), width(), xmin, and ymin.
Referenced by QgsMapToolZoom::canvasReleaseEvent(), QgsComposition::computeWorldFileParameters(), QgsVectorLayer::draw(), QgsComposerMap::overviewExtentChanged(), QgsMapCanvas::panToSelected(), QgsMapCanvas::setExtent(), QgsRasterLayerSaveAsDialog::setResolution(), QgsMapCanvas::wheelEvent(), QgsComposerView::wheelZoom(), and QgsMapCanvas::zoomToSelected().
void QgsRectangle::combineExtentWith | ( | QgsRectangle * | rect | ) |
expand the rectangle so that covers both the original rectangle and the given rectangle
Definition at line 170 of file qgsrectangle.cpp.
References xmax, xMaximum(), xmin, xMinimum(), ymax, yMaximum(), ymin, and yMinimum().
Referenced by QgsVectorLayer::boundingBoxOfSelected(), QgsRasterProjector::calcSrcExtent(), QgsVectorLayer::extent(), QgsCoordinateTransform::transformBoundingBox(), and QgsRubberBand::updateRect().
void QgsRectangle::combineExtentWith | ( | double | x, |
double | y | ||
) |
bool QgsRectangle::contains | ( | const QgsRectangle & | rect | ) | const |
return true when rectangle contains other rectangle
Definition at line 159 of file qgsrectangle.cpp.
References xmax, xmin, ymax, and ymin.
Referenced by QgsFeatureRendererV2::_getPolygon(), QgsRasterProjector::approximateSrcRowCol(), QgsMapToolIdentify::identifyRasterLayer(), QgsRasterProjector::preciseSrcRowCol(), QgsVectorLayer::snapWithContext(), and QgsRasterFileWriter::writeDataRaster().
bool QgsRectangle::contains | ( | const QgsPoint & | p | ) | const |
return true when rectangle contains a point
Definition at line 164 of file qgsrectangle.cpp.
References QgsPoint::x(), xmax, xmin, QgsPoint::y(), ymax, and ymin.
|
inline |
Height of the rectangle.
Definition at line 204 of file qgsrectangle.h.
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(), QgsComposerMap::drawOverviewMapExtent(), QgsRasterFileWriter::globalOutputParameters(), QgsRasterInterface::histogram(), QgsRasterDataProvider::identify(), QgsMapToolIdentify::identifyRasterLayer(), QgsRasterInterface::initHistogram(), QgsRasterInterface::initStatistics(), QgsMapOverviewCanvas::mouseReleaseEvent(), QgsRasterCalculator::outputGeoTransform(), QgsComposerMap::overviewExtentChanged(), QgsComposerMap::paint(), QgsAtlasComposition::prepareMap(), QgsRasterLayer::previewAsPixmap(), QgsRasterLayer::rasterUnitsPerPixelY(), QgsRasterIterator::readNextRasterPart(), QgsRasterLayerSaveAsDialog::recalcResolution(), QgsRasterLayerSaveAsDialog::recalcSize(), scale(), QgsMapCanvas::setExtent(), QgsMapRenderer::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsComposerMap::setNewExtent(), QgsRasterLayerSaveAsDialog::setOriginalResolution(), QgsVectorLayerEditUtils::splitFeatures(), QgsVectorLayerEditUtils::splitParts(), QgsRasterBlock::subRect(), toString(), QgsCoordinateTransform::transformBoundingBox(), and QgsMapRenderer::updateFullExtent().
QgsRectangle QgsRectangle::intersect | ( | const QgsRectangle * | rect | ) | const |
return the intersection with the given rectangle
Definition at line 130 of file qgsrectangle.cpp.
References intersects(), QgsRectangle(), setXMaximum(), setXMinimum(), setYMaximum(), setYMinimum(), xmax, xMaximum(), xmin, xMinimum(), ymax, yMaximum(), ymin, and yMinimum().
Referenced by QgsRasterDataProvider::block(), QgsRasterProjector::calcSrcExtent(), QgsZonalStatistics::calculateStatistics(), QgsZonalStatistics::cellInfoForBBox(), QgsRasterLayer::draw(), QgsComposerMap::drawOverviewMapExtent(), QgsRasterInterface::initHistogram(), QgsRasterInterface::initStatistics(), and QgsRasterCalculator::readRasterPart().
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 | ( | ) |
bool QgsRectangle::isEmpty | ( | ) | const |
test if rectangle is empty
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(), QgsRasterLayer::draw(), QgsVectorLayer::draw(), QgsMapOverviewCanvas::drawExtentRect(), QgsGml::endElement(), QgsComposerAttributeTable::getFeatureAttributes(), QgsGml::getFeatures(), QgsRasterDataProvider::identify(), QgsRasterInterface::initHistogram(), QgsRasterInterface::initStatistics(), QgsVectorLayer::metadata(), QgsRasterMinMaxWidget::on_mLoadPushButton_clicked(), QgsAtlasComposition::prepareMap(), QgsRasterCalculator::readRasterPart(), QgsMapRenderer::render(), QgsRasterLayer::setContrastEnhancement(), QgsMapRenderer::setDestinationCrs(), QgsMapCanvas::setExtent(), QgsMapRenderer::setExtent(), QgsMapCanvasItem::setRect(), QgsVectorLayerEditUtils::splitFeatures(), QgsVectorLayerEditUtils::splitParts(), toString(), QgsCoordinateTransform::transformBoundingBox(), QgsMapRenderer::updateFullExtent(), QgsHighlight::updateRect(), QgsMapCanvas::zoomToFullExtent(), 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 332 of file qgsrectangle.cpp.
References xmax, xmin, ymax, and ymin.
Referenced by QgsVectorLayer::draw(), and QgsMapRenderer::render().
void QgsRectangle::normalize | ( | ) |
Normalize the rectangle so it has non-negative width/height.
Definition at line 77 of file qgsrectangle.cpp.
References xmax, xmin, ymax, and ymin.
Referenced by QgsMapToolZoom::canvasReleaseEvent(), QgsVectorLayer::invertSelectionInRectangle(), QgsRectangle(), QgsOgcUtils::rectangleFromGMLBox(), QgsOgcUtils::rectangleFromGMLEnvelope(), QgsVectorLayer::select(), and set().
bool QgsRectangle::operator!= | ( | const QgsRectangle & | r1 | ) | const |
Comparison operator
Definition at line 300 of file qgsrectangle.cpp.
QgsRectangle & QgsRectangle::operator= | ( | const QgsRectangle & | r1 | ) |
Assignment operator
r1 | QgsRectangle to assign from |
Definition at line 306 of file qgsrectangle.cpp.
References xmax, xMaximum(), xmin, xMinimum(), ymax, yMaximum(), ymin, and yMinimum().
bool QgsRectangle::operator== | ( | const QgsRectangle & | r1 | ) | const |
Comparison operator
Definition at line 291 of file qgsrectangle.cpp.
References xMaximum(), xMinimum(), yMaximum(), and yMinimum().
void QgsRectangle::scale | ( | double | scaleFactor, |
const QgsPoint * | c = 0 |
||
) |
Scale the rectangle around its center point.
Definition at line 98 of file qgsrectangle.cpp.
References height(), width(), QgsPoint::x(), xmin, QgsPoint::y(), and ymin.
Referenced by QgsMapToolZoom::canvasReleaseEvent(), QgsComposerView::endMarqueeZoom(), QgsComposerView::mousePressEvent(), QgsComposerView::mouseReleaseEvent(), QgsMapToolTouch::pinchTriggered(), QgsAtlasComposition::prepareMap(), QgsComposerMap::setNewScale(), QgsMapOverviewCanvas::updateFullExtent(), QgsMapCanvas::wheelEvent(), QgsMapCanvas::zoomByFactor(), QgsMapCanvas::zoomToFullExtent(), QgsMapCanvas::zoomToSelected(), and QgsMapCanvas::zoomWithCenter().
void QgsRectangle::scale | ( | double | scaleFactor, |
double | centerX, | ||
double | centerY | ||
) |
Set the rectangle from two QgsPoints.
The rectangle is normalised after construction.
Definition at line 59 of file qgsrectangle.cpp.
References normalize(), QgsPoint::x(), xmax, xmin, QgsPoint::y(), ymax, and ymin.
Referenced by QgsVectorLayer::boundingBoxOfSelected(), QgsGml::createBBoxFromCoordinateString(), QgsRasterLayer::draw(), and QgsMapRenderer::updateFullExtent().
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 | ( | ) |
Set a rectangle so that min corner is at max and max corner is at min.
It is NOT normalized.
Definition at line 90 of file qgsrectangle.cpp.
References MathUtils::max(), xmax, xmin, ymax, and ymin.
Referenced by QgsGeometry::boundingBox(), QgsVectorLayer::boundingBoxOfSelected(), QgsRasterLayer::draw(), QgsVectorLayer::extent(), QgsGml::getFeatures(), QgsMapRenderer::setProjectionsEnabled(), QgsCoordinateTransform::transformBoundingBox(), and QgsMapRenderer::updateFullExtent().
|
inline |
Set the maximum x value.
Definition at line 164 of file qgsrectangle.h.
References xmax.
Referenced by QgsVectorLayerEditUtils::addRing(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterDataProvider::block(), QgsRasterProjector::calcSrcExtent(), QgsMapToolZoom::canvasReleaseEvent(), QgsMapTip::fetchFeature(), QgsMapToolIdentify::identifyRasterLayer(), QgsMapToolIdentify::identifyVectorLayer(), intersect(), QgsMapCanvas::keyPressEvent(), QgsMapOverviewCanvas::mouseReleaseEvent(), QgsComposerMap::moveContent(), QgsMapRenderer::readXML(), QgsComposerMap::requestedExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsVectorLayerEditUtils::splitFeatures(), QgsMapRenderer::splitLayersExtent(), QgsVectorLayerEditUtils::splitParts(), unionRect(), QgsHighlight::updateRect(), and QgsComposerMap::zoomContent().
|
inline |
Set the minimum x value.
Definition at line 159 of file qgsrectangle.h.
References xmin.
Referenced by QgsVectorLayerEditUtils::addRing(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterDataProvider::block(), QgsRasterProjector::calcSrcExtent(), QgsMapToolZoom::canvasReleaseEvent(), QgsMapTip::fetchFeature(), QgsMapToolIdentify::identifyRasterLayer(), QgsMapToolIdentify::identifyVectorLayer(), intersect(), QgsMapCanvas::keyPressEvent(), QgsMapOverviewCanvas::mouseReleaseEvent(), QgsComposerMap::moveContent(), QgsMapCanvas::panActionEnd(), QgsMapRenderer::readXML(), QgsComposerMap::requestedExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsVectorLayerEditUtils::splitFeatures(), QgsMapRenderer::splitLayersExtent(), QgsVectorLayerEditUtils::splitParts(), unionRect(), QgsHighlight::updateRect(), and QgsComposerMap::zoomContent().
|
inline |
Set the maximum y value.
Definition at line 174 of file qgsrectangle.h.
References ymax.
Referenced by QgsVectorLayerEditUtils::addRing(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterDataProvider::block(), QgsRasterProjector::calcSrcExtent(), QgsMapToolZoom::canvasReleaseEvent(), QgsMapTip::fetchFeature(), QgsMapToolIdentify::identifyRasterLayer(), QgsMapToolIdentify::identifyVectorLayer(), intersect(), QgsMapCanvas::keyPressEvent(), QgsMapOverviewCanvas::mouseReleaseEvent(), QgsComposerMap::moveContent(), QgsMapRenderer::readXML(), QgsComposerMap::requestedExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsVectorLayerEditUtils::splitFeatures(), QgsVectorLayerEditUtils::splitParts(), unionRect(), QgsHighlight::updateRect(), and QgsComposerMap::zoomContent().
|
inline |
Set the minimum y value.
Definition at line 169 of file qgsrectangle.h.
References ymin.
Referenced by QgsVectorLayerEditUtils::addRing(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterDataProvider::block(), QgsRasterProjector::calcSrcExtent(), QgsMapToolZoom::canvasReleaseEvent(), QgsMapTip::fetchFeature(), QgsMapToolIdentify::identifyRasterLayer(), QgsMapToolIdentify::identifyVectorLayer(), intersect(), QgsMapCanvas::keyPressEvent(), QgsMapOverviewCanvas::mouseReleaseEvent(), QgsComposerMap::moveContent(), QgsMapRenderer::readXML(), QgsComposerMap::requestedExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsVectorLayerEditUtils::splitFeatures(), QgsVectorLayerEditUtils::splitParts(), unionRect(), QgsHighlight::updateRect(), and QgsComposerMap::zoomContent().
QRectF QgsRectangle::toRectF | ( | ) | const |
returns a QRectF with same coordinates.
Definition at line 222 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 |
returns string representation of form xmin,ymin xmax,ymax
Definition at line 228 of file qgsrectangle.cpp.
References height(), and width().
Referenced by QgsMapRenderer::adjustExtentToSize(), QgsBrightnessContrastFilter::block(), QgsRasterResampleFilter::block(), QgsHueSaturationFilter::block(), QgsRasterProjector::block(), QgsRasterDataProvider::block(), QgsRasterProjector::calcSrcExtent(), QgsMapToolZoom::canvasReleaseEvent(), QgsRasterLayer::draw(), QgsVectorLayer::draw(), QgsVectorLayer::extent(), QgsMapRenderer::layerExtentToOutputExtent(), QgsRasterLayer::metadata(), operator<<(), QgsMapRenderer::outputExtentToLayerExtent(), QgsRasterProjector::QgsRasterProjector(), QgsMapRenderer::render(), QgsRasterChecker::runTest(), QgsRasterLayer::setDataProvider(), QgsRasterBlock::subRect(), QgsCoordinateTransform::transformBoundingBox(), and QgsMapRenderer::updateFullExtent().
QString QgsRectangle::toString | ( | int | thePrecision | ) | const |
overloaded toString that allows precision of numbers to be set
Definition at line 248 of file qgsrectangle.cpp.
References isEmpty(), QgsDebugMsgLevel, xmax, xmin, ymax, and ymin.
void QgsRectangle::unionRect | ( | const QgsRectangle & | rect | ) |
updates rectangle to include passed argument
Definition at line 320 of file qgsrectangle.cpp.
References setXMaximum(), setXMinimum(), setYMaximum(), setYMinimum(), xMaximum(), xMinimum(), yMaximum(), and yMinimum().
Referenced by QgsGml::calculateExtentFromFeatures(), and QgsMapRenderer::updateFullExtent().
|
inline |
Width of the rectangle.
Definition at line 199 of file qgsrectangle.h.
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(), QgsComposerMap::drawOverviewMapExtent(), QgsMapTip::fetchFeature(), QgsRasterFileWriter::globalOutputParameters(), QgsRasterInterface::histogram(), QgsRasterDataProvider::identify(), QgsMapToolIdentify::identifyRasterLayer(), QgsMapToolIdentify::identifyVectorLayer(), QgsRasterInterface::initHistogram(), QgsRasterInterface::initStatistics(), QgsComposerMap::mapUnitsToMM(), QgsComposerScaleBar::mapWidth(), QgsMapOverviewCanvas::mouseReleaseEvent(), QgsRasterCalculator::outputGeoTransform(), QgsComposerMap::overviewExtentChanged(), QgsComposerMap::paint(), QgsHighlight::paintPoint(), QgsAtlasComposition::prepareMap(), QgsRasterLayer::previewAsPixmap(), QgsRasterLayer::rasterUnitsPerPixelX(), QgsRasterIterator::readNextRasterPart(), QgsRasterLayerSaveAsDialog::recalcResolution(), QgsRasterLayerSaveAsDialog::recalcSize(), scale(), QgsMapCanvas::setExtent(), QgsMapRenderer::setExtent(), QgsFormAnnotationItem::setFeatureForMapPosition(), QgsHtmlAnnotationItem::setFeatureForMapPosition(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsComposerMap::setNewExtent(), QgsRasterLayerSaveAsDialog::setOriginalResolution(), QgsComposerMap::setSceneRect(), QgsVectorLayerEditUtils::splitFeatures(), QgsVectorLayerEditUtils::splitParts(), QgsRasterBlock::subRect(), toString(), QgsCoordinateTransform::transformBoundingBox(), QgsMapRenderer::updateFullExtent(), and QgsHighlight::updateRect().
|
inline |
Get the x maximum value (right side of rectangle)
Definition at line 179 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(), QgsRasterLayer::draw(), QgsVectorLayer::draw(), QgsMapOverviewCanvas::drawExtentRect(), QgsPalLabeling::drawLabeling(), QgsVectorLayer::extent(), QgsGeometry::fromRect(), generalizeWkbGeometry(), intersect(), QgsClipper::intersectRect(), QgsMapCanvas::keyPressEvent(), QgsLabelSearchTree::labelsInRect(), QgsComposerMap::mapPolygon(), QgsComposerMap::mapToItemCoords(), QgsComposerScaleBar::mapWidth(), QgsVectorLayer::metadata(), operator=(), operator==(), QgsHighlight::paint(), QgsComposerMap::paint(), QgsAtlasComposition::prepareMap(), QgsRectangle(), QgsRasterCalculator::readRasterPart(), QgsOgcUtils::rectangleToGMLBox(), QgsOgcUtils::rectangleToGMLEnvelope(), QgsSpatialIndex::rectToRegion(), QgsMapRenderer::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsRasterLayerSaveAsDialog::setOutputExtent(), QgsMapCanvasItem::setRect(), QgsComposerMap::setSceneRect(), QgsMapToPixelSimplifier::simplifyWkbGeometry(), QgsVectorLayerEditUtils::splitFeatures(), QgsMapRenderer::splitLayersExtent(), QgsVectorLayerEditUtils::splitParts(), QgsRasterBlock::subRect(), QgsCoordinateTransform::transform(), QgsClipper::trimPolygon(), unionRect(), QgsMapRenderer::updateFullExtent(), QgsHighlight::updateRect(), QgsComposerMap::writeXML(), QgsMapRenderer::writeXML(), and QgsComposerMap::zoomContent().
|
inline |
Get the x minimum value (left side of rectangle)
Definition at line 184 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(), QgsComposerMap::cache(), 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(), QgsRasterLayer::draw(), QgsVectorLayer::draw(), QgsMapOverviewCanvas::drawExtentRect(), QgsPalLabeling::drawLabeling(), QgsComposerMap::drawOverviewMapExtent(), QgsGeometryAnalyzer::extent(), QgsVectorLayer::extent(), QgsGeometry::fromRect(), 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(), QgsHighlight::paint(), QgsComposerMap::paint(), QgsRasterProjector::preciseSrcRowCol(), QgsAtlasComposition::prepareMap(), QgsRectangle(), QgsRasterIterator::readNextRasterPart(), QgsRasterCalculator::readRasterPart(), QgsOgcUtils::rectangleToGMLBox(), QgsOgcUtils::rectangleToGMLEnvelope(), QgsSpatialIndex::rectToRegion(), QgsRenderChecker::runTest(), QgsMapCanvas::saveAsImage(), QgsMapRenderer::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsRasterLayerSaveAsDialog::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(), QgsMapRenderer::updateFullExtent(), QgsHighlight::updateRect(), QgsGridFileWriter::writeFile(), QgsGridFileWriter::writeHeader(), QgsComposerMap::writeXML(), QgsMapRenderer::writeXML(), and QgsComposerMap::zoomContent().
|
inline |
Get the y maximum value (top side of rectangle)
Definition at line 189 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(), QgsRasterLayer::draw(), QgsVectorLayer::draw(), QgsMapOverviewCanvas::drawExtentRect(), QgsPalLabeling::drawLabeling(), QgsComposerMap::drawOverviewMapExtent(), QgsVectorLayer::extent(), QgsGeometry::fromRect(), generalizeWkbGeometry(), QgsRasterFileWriter::globalOutputParameters(), QgsRasterInterface::histogram(), QgsRasterDataProvider::identify(), intersect(), QgsClipper::intersectRect(), QgsMapCanvas::keyPressEvent(), QgsLabelSearchTree::labelsInRect(), QgsComposerMap::mapPolygon(), QgsComposerMap::mapToItemCoords(), QgsVectorLayer::metadata(), operator=(), operator==(), QgsRasterCalculator::outputGeoTransform(), QgsHighlight::paint(), QgsComposerMap::paint(), QgsRasterProjector::preciseSrcRowCol(), QgsAtlasComposition::prepareMap(), QgsRectangle(), QgsRasterIterator::readNextRasterPart(), QgsRasterCalculator::readRasterPart(), QgsOgcUtils::rectangleToGMLBox(), QgsOgcUtils::rectangleToGMLEnvelope(), QgsSpatialIndex::rectToRegion(), QgsRenderChecker::runTest(), QgsMapCanvas::saveAsImage(), QgsMapRenderer::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsRasterLayerSaveAsDialog::setOutputExtent(), QgsMapCanvasItem::setRect(), QgsMapToPixelSimplifier::simplifyWkbGeometry(), QgsVectorLayerEditUtils::splitFeatures(), QgsMapRenderer::splitLayersExtent(), QgsVectorLayerEditUtils::splitParts(), QgsZonalStatistics::statisticsFromMiddlePointTest(), QgsZonalStatistics::statisticsFromPreciseIntersection(), QgsRasterBlock::subRect(), QgsCoordinateTransform::transform(), QgsClipper::trimPolygon(), unionRect(), QgsMapRenderer::updateFullExtent(), QgsHighlight::updateRect(), QgsGridFileWriter::writeFile(), QgsComposerMap::writeXML(), QgsMapRenderer::writeXML(), and QgsComposerMap::zoomContent().
|
inline |
Get the y minimum value (bottom side of rectangle)
Definition at line 194 of file qgsrectangle.h.
References ymin.
Referenced by QgsFeatureRendererV2::_getLineString(), QgsFeatureRendererV2::_getPolygon(), QgsPointSample::addSamplePoints(), QgsComposerMap::adjustExtentToItemShape(), QgsMapRenderer::adjustExtentToSize(), QgsRasterDataProvider::block(), QgsVectorLayer::boundingBoxOfSelected(), QgsComposerMap::cache(), QgsRasterProjector::calcSrcExtent(), QgsScaleCalculator::calculateGeographicDistance(), QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox(), QgsMapToPixelSimplifier::canbeGeneralizedByMapBoundingBox(), QgsZonalStatistics::cellInfoForBBox(), QgsClipper::clippedLineWKB(), combineExtentWith(), QgsComposition::computeWorldFileParameters(), QgsClipper::connectSeparatedLines(), QgsRasterLayer::draw(), QgsVectorLayer::draw(), QgsMapOverviewCanvas::drawExtentRect(), QgsPalLabeling::drawLabeling(), QgsVectorLayer::extent(), QgsGeometry::fromRect(), generalizeWkbGeometry(), intersect(), QgsClipper::intersectRect(), QgsMapCanvas::keyPressEvent(), QgsLabelSearchTree::labelsInRect(), QgsComposerMap::mapPolygon(), QgsComposerMap::mapToItemCoords(), QgsComposerScaleBar::mapWidth(), QgsVectorLayer::metadata(), operator=(), operator==(), QgsHighlight::paint(), QgsComposerMap::paint(), QgsRasterProjector::preciseSrcRowCol(), QgsAtlasComposition::prepareMap(), QgsRectangle(), QgsRasterCalculator::readRasterPart(), QgsOgcUtils::rectangleToGMLBox(), QgsOgcUtils::rectangleToGMLEnvelope(), QgsSpatialIndex::rectToRegion(), QgsMapRenderer::setExtent(), QgsComposerMap::setNewAtlasFeatureExtent(), QgsRasterLayerSaveAsDialog::setOutputExtent(), QgsMapCanvasItem::setRect(), QgsComposerMap::setSceneRect(), QgsMapToPixelSimplifier::simplifyWkbGeometry(), QgsVectorLayerEditUtils::splitFeatures(), QgsMapRenderer::splitLayersExtent(), QgsVectorLayerEditUtils::splitParts(), QgsRasterBlock::subRect(), QgsCoordinateTransform::transform(), QgsCoordinateTransform::transformBoundingBox(), QgsClipper::trimPolygon(), unionRect(), QgsMapRenderer::updateFullExtent(), QgsHighlight::updateRect(), QgsGridFileWriter::writeHeader(), QgsComposerMap::writeXML(), QgsMapRenderer::writeXML(), and QgsComposerMap::zoomContent().
|
protected |
Definition at line 149 of file qgsrectangle.h.
Referenced by asPolygon(), asWktCoordinates(), asWktPolygon(), buffer(), combineExtentWith(), contains(), intersect(), intersects(), invert(), isEmpty(), isFinite(), normalize(), operator=(), QgsRectangle(), scale(), set(), setMinimal(), setXMaximum(), toRectF(), toString(), width(), and xMaximum().
|
protected |
Definition at line 147 of file qgsrectangle.h.
Referenced by asPolygon(), asWktCoordinates(), asWktPolygon(), buffer(), center(), combineExtentWith(), contains(), intersect(), intersects(), invert(), isEmpty(), isFinite(), normalize(), operator=(), QgsRectangle(), scale(), set(), setMinimal(), setXMinimum(), toRectF(), toString(), width(), and xMinimum().
|
protected |
Definition at line 150 of file qgsrectangle.h.
Referenced by asPolygon(), asWktCoordinates(), asWktPolygon(), buffer(), combineExtentWith(), contains(), height(), intersect(), intersects(), invert(), isEmpty(), isFinite(), normalize(), operator=(), QgsRectangle(), scale(), set(), setMinimal(), setYMaximum(), toRectF(), toString(), and yMaximum().
|
protected |
Definition at line 148 of file qgsrectangle.h.
Referenced by asPolygon(), asWktCoordinates(), asWktPolygon(), buffer(), center(), combineExtentWith(), contains(), height(), intersect(), intersects(), invert(), isEmpty(), isFinite(), normalize(), operator=(), QgsRectangle(), scale(), set(), setMinimal(), setYMinimum(), toRectF(), toString(), and yMinimum().