30 #ifndef Pt_Gfx_PaintSurface_h
31 #define Pt_Gfx_PaintSurface_h
33 #include <Pt/Gfx/Api.h>
34 #include <Pt/Gfx/ImageFormat.h>
35 #include <Pt/Gfx/Scaling.h>
36 #include <Pt/NonCopyable.h>
37 #include <Pt/System/Path.h>
153 void onDetachCanvas(
Canvas& canvas);
Core module.
Definition: Allocator.h:33
void invalidate()
Invalidates the currently active paint canvas.
virtual void onReleaseCanvas()=0
Releases the current Canvas.
Backend canvas for drawing commands.
Definition: Canvas.h:66
virtual void onFinish()=0
Finishes painting to the surface.
const Gfx::SizeF & size() const
Returns the size in physical pixels.
virtual const Gfx::SizeF & onGetSize() const =0
Returns the size in physical pixel.
Active painting session for a surface.
Definition: PaintContext.h:52
Base class for drawing commands and paint state.
Definition: PainterBase.h:73
Logical-to-physical unit conversion.
Definition: Scaling.h:49
Size with floating-point width and height.
Definition: Size.h:45
virtual Gfx::Canvas * onCreateCanvas(Gfx::Canvas *reuse)=0
Creates a Canvas.
virtual const Gfx::ImageFormat & onGetFormat() const =0
Returns the image format.
void sync()
Synchronizes pending operations to the surface.
Abstract target for drawing operations.
Definition: PaintSurface.h:55
const Gfx::ImageFormat & format() const
Returns the image format.
void finish()
Finishes painting to the surface.
virtual ~PaintSurface()
Destructor.
const Scaling & scaling() const
Returns the scaling from logical to physical pixels.
virtual const Scaling & onGetScaling() const =0
Returns the scaling fro logical to physical pixels.
virtual void onSync()=0
Synchronizes pending operations to the surface.
virtual Gfx::Canvas * onGetCanvas(Gfx::Canvas *reuse)
Returns a reusable canvas instance.
Protects derived classes from being copied.
Definition: NonCopyable.h:54
Canvas * getCanvas(Canvas *canvas)
Returns a canvas for backend drawing.
PaintSurface()
Default constructor.