mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-04 00:06:46 -05:00
const qgsrectangle
This commit is contained in:
parent
c63c630c16
commit
e7568f24ef
@ -67,7 +67,7 @@ The WKT must contain only 5 vertices, representing a rectangle aligned with X an
|
||||
.. versionadded:: 3.0
|
||||
%End
|
||||
|
||||
static QgsRectangle fromCenterAndSize( QgsPointXY center, double width, double height );
|
||||
static QgsRectangle fromCenterAndSize( const QgsPointXY ¢er, double width, double height );
|
||||
%Docstring
|
||||
Creates a new rectangle, given the specified ``center`` point
|
||||
and ``width`` and ``height``.
|
||||
|
||||
@ -49,7 +49,7 @@ QgsRectangle QgsRectangle::fromWkt( const QString &wkt )
|
||||
return QgsRectangle();
|
||||
}
|
||||
|
||||
QgsRectangle QgsRectangle::fromCenterAndSize( QgsPointXY center, double width, double height )
|
||||
QgsRectangle QgsRectangle::fromCenterAndSize( const QgsPointXY ¢er, double width, double height )
|
||||
{
|
||||
const double xMin = center.x() - width / 2.0;
|
||||
const double xMax = xMin + width;
|
||||
|
||||
@ -111,7 +111,7 @@ class CORE_EXPORT QgsRectangle
|
||||
* and \a width and \a height.
|
||||
* \since QGIS 3.0
|
||||
*/
|
||||
static QgsRectangle fromCenterAndSize( QgsPointXY center, double width, double height );
|
||||
static QgsRectangle fromCenterAndSize( const QgsPointXY ¢er, double width, double height );
|
||||
|
||||
/**
|
||||
* Sets the rectangle from two QgsPoints.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user