Using the Canvas

From RAD Studio
Jump to: navigation, search

Go Up to Using Canvases for Drawing


The canvas class encapsulates graphics controls at several levels. Some of these are:

  • High-level functions for drawing individual lines, shapes, and text.
  • Intermediate-level properties for manipulating the drawing capabilities of the canvas.
  • Low-level properties in the component library that provide access to the Windows GDI.

The following table summarizes the capabilities of the canvas.

Canvas capability summary

Level Operation Tools

High

Drawing lines and shapes

Methods such as MoveTo, LineTo, Rectangle, and Ellipse

Displaying and measuring text

TextOut, TextHeight, TextWidth, and TextRect methods

Filling areas

FillRect and FloodFill methods

Intermediate

Customizing text and graphics

Pen, Brush, and Font properties

Manipulating pixels

Pixels property

Copying and merging images

Draw, StretchDraw, BrushCopy, and CopyRect methods; CopyMode property

Low

Calling Windows GDI functions

Handle property

See Also