16 #ifndef QGSMAPCANVASITEM_H
17 #define QGSMAPCANVASITEM_H
19 #include <QGraphicsItem>
43 virtual void paint( QPainter *painter ) = 0;
45 void paint( QPainter *painter,
46 const QStyleOptionGraphicsItem *option,
47 QWidget *widget =
nullptr )
override;
58 bool setRenderContextVariables( QPainter *p,
QgsRenderContext &context )
const;
63 virtual void updatePosition();
65 QRectF boundingRect()
const override;
71 void setRect(
const QgsRectangle &r,
bool resetRotation =
true );
74 QgsPointXY toMapCoordinates( QPoint point )
const;
77 QPointF toCanvasCoordinates(
const QgsPointXY &point )
const;