23 #include "qgis_core.h" 89 static QgsCircle fromCenterDiameter(
const QgsPoint ¢er,
double diameter,
double azimuth = 0 );
195 int outerTangents(
const QgsCircle &other,
199 double area()
const override;
226 mSemiMajorAxis = std::fabs( radius );
236 QVector<QgsPoint> northQuadrant()
const SIP_FACTORY;
245 bool contains(
const QgsPoint &point,
double epsilon = 1E-8 )
const;
249 QString
toString(
int pointPrecision = 17,
int radiusPrecision = 17,
int azimuthPrecision = 2 )
const override;
252 SIP_PYOBJECT __repr__();
254 QString str = QStringLiteral(
"<QgsCircle: %1>" ).arg( sipCpp->toString() );
255 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
260 #endif // QGSCIRCLE_H void setRadius(double radius)
Sets the radius of the circle.
A rectangle specified with double values.
static QgsEllipse fromCenterPoint(const QgsPoint &ptc, const QgsPoint &pt1)
Constructs an ellipse by a center point and a another point.
A class to represent a 2D point.
virtual double area() const
The area of the ellipse.
static QgsEllipse fromExtent(const QgsPoint &pt1, const QgsPoint &pt2)
Constructs an ellipse by an extent (aka bounding box / QgsRectangle).
virtual QgsRectangle boundingBox() const
Returns the minimal bounding box for the ellipse.
virtual void setSemiMinorAxis(double semiMinorAxis)
Sets the semi-minor axis.
Point geometry type, with support for z-dimension and m-values.
virtual void setSemiMajorAxis(double semiMajorAxis)
Sets the semi-major axis.
virtual QString toString(int pointPrecision=17, int axisPrecision=17, int azimuthPrecision=2) const
returns a string representation of the ellipse.
Circular string geometry type.
double radius() const
Returns the radius of the circle.
virtual double perimeter() const
The circumference of the ellipse using first approximation of Ramanujan.