26 explicit renderer(QObject *parent =
nullptr);
41 void render(QPainter &painter,
const QRegion ®ion)
const;
42 void render(QPainter &painter,
const QRect &area)
const;
Records regions of the map that should be updated.
Renders the map on widgets.
void unqueue_updates()
Processes all pending map updates and writes them to the map buffer.
void repaint_needed(const QRegion &where)
void set_viewport_size(const QSize &size)
Instructs the renderer to draw a viewport with a different size.
void set_scale(double scale)
Changes the scale of the rendering (zooms in or out).
virtual ~renderer()=default
map_updates_handler * m_updates
void set_origin(const QPointF &origin)
Changes the origin of the canvas (the point at the top left of the view).
QPointF origin() const
The origin of the view (the point at the top left corner)
void render(QPainter &painter, const QRegion ®ion) const
Renders the specified region of the visible portion of the map on painter.
double scale() const
The scale (zoom) at which rendering is performed.
renderer(QObject *parent=nullptr)
Constructor.
QSize viewport_size() const
The current dimensions of the viewport.