#include <Pt/Forms/PaintSurface.h>
Forms render target for painting. More...
Inherits PaintSurface.
Inherited by Pixmap.
Public Member Functions | |
| PaintSurface () | |
| Constructs an unbound paint surface. | |
| ~PaintSurface () | |
| Destructor. | |
| void | drawPixmap (Gfx::Canvas &canvas, const Gfx::PointF &to, const Pixmap &pixmap, const Gfx::RectF *rect=0) |
| Draws pixmap onto canvas at to. | |
| const Gfx::ImageFormat & | format () const |
| Returns the image format. | |
| const Gfx::SizeF & | size () const |
| Returns the size in physical pixels. | |
| const Scaling & | scaling () const |
| Returns the scaling from logical to physical pixels. | |
| Canvas * | getCanvas (Canvas *canvas) |
| Returns a canvas for backend drawing. | |
| void | sync () |
| Synchronizes pending operations to the surface. | |
| void | finish () |
| Finishes painting to the surface. | |
Protected Member Functions | |
| virtual void | onDrawPixmap (Gfx::Canvas &canvas, const Gfx::PointF &to, const Pixmap &pixmap, const Gfx::RectF *rect=0)=0 |
| Draws pixmap onto canvas at to. | |
| void | invalidate () |
| Invalidates the currently active paint canvas. | |
| virtual const Gfx::ImageFormat & | onGetFormat () const =0 |
| Returns the image format. | |
| virtual const Gfx::SizeF & | onGetSize () const =0 |
| Returns the size in physical pixel. | |
| virtual const Scaling & | onGetScaling () const =0 |
| Returns the scaling fro logical to physical pixels. | |
| virtual Gfx::Canvas * | onGetCanvas (Gfx::Canvas *reuse) |
| Returns a reusable canvas instance. | |
| virtual Gfx::Canvas * | onCreateCanvas (Gfx::Canvas *reuse)=0 |
| Creates a Canvas. | |
| virtual void | onReleaseCanvas ()=0 |
| Releases the current Canvas. | |
| virtual void | onSync ()=0 |
| Synchronizes pending operations to the surface. | |
| virtual void | onFinish ()=0 |
| Finishes painting to the surface. | |
PaintSurface extends Gfx::PaintSurface with pixmap drawing. A view borrows a surface and adapts size, scaling, and offset. It does not own the assigned surface.
| void drawPixmap | ( | Gfx::Canvas & | canvas, |
| const Gfx::PointF & | to, | ||
| const Pixmap & | pixmap, | ||
| const Gfx::RectF * | rect = 0 ) |
When rect is not null, only that region of the pixmap is drawn.