#include <Pt/Forms/Pixmap.h>
Off-screen Forms paint surface. More...
Inherits PaintSurface.
Public Member Functions | |
| Pixmap () | |
| Creates an empty pixmap. | |
| virtual | ~Pixmap () |
| Destructor. | |
| void | reset () |
| Clears the pixmap. | |
| void | reset (const Gfx::Image &image) |
| Resets the pixmap from image. | |
| void | reset (const Gfx::SizeF &size) |
| Resets the pixmap to size in physical pixels. | |
| bool | empty () const |
| Returns true when the pixmap has no size. | |
| void | getBitmap (Gfx::Bitmap &image, const Gfx::RectF &rect) |
| Copies rect into image. | |
| void | setScaleFactor (double v) |
| Sets the scale factor to v. | |
| IPixmapImpl * | impl () |
| Returns the platform pixmap implementation. | |
| const IPixmapImpl * | impl () const |
| Returns the platform pixmap implementation. | |
| 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) override |
| Draws pixmap onto canvas at to. | |
| virtual const Gfx::ImageFormat & | onGetFormat () const override |
| Returns the image format. | |
| virtual const Gfx::SizeF & | onGetSize () const override |
| Returns the size in physical pixel. | |
| virtual const Gfx::Scaling & | onGetScaling () const override |
| Returns the scaling fro logical to physical pixels. | |
| virtual Gfx::Canvas * | onGetCanvas (Gfx::Canvas *reuse) override |
| Returns a reusable canvas instance. | |
| virtual Gfx::Canvas * | onCreateCanvas (Gfx::Canvas *reuse) override |
| Creates a Canvas. | |
| virtual void | onReleaseCanvas () override |
| Releases the current Canvas. | |
| virtual void | onSync () override |
| Synchronizes pending operations to the surface. | |
| virtual void | onFinish () override |
| Finishes painting to the surface. | |
| void | invalidate () |
| Invalidates the currently active paint canvas. | |
A Pixmap is a PaintSurface used as a back buffer or as cached image content. Reset it from an image or a size in physical pixels.
| IPixmapImpl * impl | ( | ) |
This is an implementation API for Forms backends.
| const IPixmapImpl * impl | ( | ) | const |
This is an implementation API for Forms backends.
|
inherited |
When rect is not null, only that region of the pixmap is drawn.