18#ifndef QGSANNOTATIONPICTUREITEM_H
19#define QGSANNOTATIONPICTUREITEM_H
41 QString
type()
const override;
56 QString
path()
const {
return mPath; }
76 bool lockAspectRatio()
const;
83 void setLockAspectRatio(
bool locked );
123 bool mLockAspectRatio =
true;
PictureFormat
Picture formats.
@ Unknown
Invalid or unknown image type.
BillboardScaleMode
3D billboard scaling modes.
@ ViewIndependent
Billboard has a fixed pixel size on the screen, regardless of the camera distance.
virtual bool writeXml(QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const =0
Writes the item's state into an XML element.
virtual QString type() const =0
Returns a unique (untranslated) string identifying the type of item.
virtual bool readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads the item's state from the given DOM element.
virtual QgsAnnotationItem * clone() const =0
Returns a clone of the item.
An annotation item which renders a picture.
Qgis::PictureFormat format() const
Returns the picture format.
QString path() const
Returns the path of the image used to render the item.
QSizeF billboard3DSize() const
Returns the 3D billboard size for the picture.
~QgsAnnotationPictureItem() override
void setBillboard3DScaleMode(Qgis::BillboardScaleMode mode)
Sets the 3D billboard scale mode for the picture.
QgsAnnotationPictureItem(Qgis::PictureFormat format, const QString &path, const QgsRectangle &bounds)
Constructor for QgsAnnotationPictureItem, rendering the specified image path within the specified bou...
Qgis::BillboardScaleMode billboard3DScaleMode() const
Returns the 3D billboard scale mode for the picture.
void setBillboard3DSize(const QSizeF &size)
Sets the 3D billboard size for the picture.
static QgsAnnotationPictureItem * create()
Creates a new polygon annotation item.
virtual void renderInBounds(QgsRenderContext &context, const QRectF &painterRect, QgsFeedback *feedback)=0
Renders the item to the specified render context.
QgsRectangle bounds() const
Returns the bounds of the item.
QgsAnnotationRectItem(const QgsRectangle &bounds)
Constructor for QgsAnnotationRectItem, rendering the annotation within the specified bounds geometry.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
A container for the context for various read/write operations on objects.
A rectangle specified with double values.
Contains information about the context of a rendering operation.