TcxCanvas Class
A GDI-based canvas for DevExpress controls.
Declaration
TcxCanvas = class(
TcxGdiBasedCanvas
)
Remarks
A control draws its content and UI elements on this canvas in GDI render mode. The TcxCanvas class wraps the standard TCanvas VCL class and extends it with additional draw routines, device context and clip region management functionality.
The TcxCanvas class has the following members that allow you to:
Create a wrapper canvas (Create).
Access the underlying VCL canvas (Canvas).
Customize brush, pen, and font settings (Brush, Pen, and Font).
Manage clip regions (GetClipRegion, ExcludeFrameRect, IntersectClipRect, SaveClipRegion, and RestoreClipRegion).
Draw arcs and Bezier curves (AngleArc, Arc, ArcTo, PolyBezier, and PolyBezierTo).
Manage GDI paths (BeginPath, EndPath, PathToRegion, and WidenPath).
Draw circle and ellipse-based shapes (Ellipse, Chord, and Pie).
Draw text (AlignMultiLineTextRectVertically, GetTextStringsBounds, DrawTexT, TextOut, TextExtent, TextHeight, and TextWidth).
Manage world coordinates transformations for the canvas (SaveWorldTransform, ModifyWorldTransform, and RestoreWorldTransform).
Manage canvas states and device contexts (SaveState, RestoreState, SaveDC and RestoreDC).
Draw regions (DrawRegion, FillRegion, and FrameRegion).
Forbid or allow other threads to interact with the canvas (Lock and Unlock).
Draw images (Draw, DrawBitmap, DrawImage, DrawGlyph, StretchDraw, and TransparentDraw).
The TcxControl.Canvas and TcxControl.ActiveCanvas properties reference a TcxCanvas object. You can use these properties to draw bitmaps and primitives on a control’s surface in GDI render mode.