29 #ifndef Pt_Gfx_PaintContext_h
30 #define Pt_Gfx_PaintContext_h
32 #include <Pt/Gfx/Api.h>
33 #include <Pt/Gfx/ImageFormat.h>
34 #include <Pt/Gfx/Rect.h>
35 #include <Pt/Gfx/Scaling.h>
36 #include <Pt/NonCopyable.h>
Core module.
Definition: Allocator.h:33
const Scaling & scaling() const
Returns the scaling from logical to physical pixels.
void resetClip()
Resets the default clip rect.
Canvas * getCanvas(Canvas *canvas)
Returns a canvas for backend drawing.
const RectF * clip() const
Returns the default clip rect or null if clipping is disabled.
PaintContext(PaintSurface &surface, const RectF &clip)
Constructs a context using the paint surface and an initial clip rect.
Backend canvas for drawing commands.
Definition: Canvas.h:66
Active painting session for a surface.
Definition: PaintContext.h:53
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:47
virtual void onDetachSurface(PaintSurface &surface)
Handles detachment from the surface.
virtual ~PaintContext()
Destructor.
const Gfx::ImageFormat & format() const
Returns the image format.
Abstract target for drawing operations.
Definition: PaintSurface.h:55
const Gfx::SizeF & size() const
Returns the size in physical pixels.
void sync()
Synchronizes pending drawing operations.
void setClip(const RectF &clip)
Sets the default clip rect for painters on this context.
Protects derived classes from being copied.
Definition: NonCopyable.h:54
Rect with floating-point coordinates.
Definition: Rect.h:47
void finish()
Finishes painting on the surface.
PaintContext(PaintSurface &surface)
Constructs a context using the paint surface.