24 , mLayerOpacity( layer->opacity() )
27 const QMap< QString, QgsAnnotationItem * > items = layer->
items();
28 mItems.reserve( items.size() );
29 for (
auto it = items.constBegin(); it != items.constEnd(); ++it )
32 mItems << ( *it )->clone();
45 return mFeedback.get();
52 bool canceled =
false;
55 if ( mFeedback->isCanceled() )
61 item->render( context, mFeedback.get() );
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
bool forceRasterRender() const override
Returns true if the renderer must be rendered to a raster paint device (e.g.
~QgsAnnotationLayerRenderer() override
bool render() override
Do the rendering (based on data stored in the class).
QgsFeedback * feedback() const override
Access to feedback object of the layer renderer (may be nullptr)
QgsAnnotationLayerRenderer(QgsAnnotationLayer *layer, QgsRenderContext &context)
Constructor for a QgsAnnotationLayerRenderer, for the specified layer.
Represents a map layer containing a set of georeferenced annotations, e.g.
QMap< QString, QgsAnnotationItem * > items() const
Returns a map of items contained in the layer, by unique item ID.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Base class for utility classes that encapsulate information necessary for rendering of map layers.
QgsRenderContext * renderContext()
Returns the render context associated with the renderer.
Contains information about the context of a rendering operation.
@ UseAdvancedEffects
Enable layer opacity and blending effects.
bool testFlag(Flag flag) const
Check whether a particular flag is enabled.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)