Sign in Join
FPDoc Onlineexperiment

TCanvas.Width property

Member of TCanvaspublishedIn unit Graphics

The Width of the Canvas.

Declaration

pascal
property Width: Integer read GetWidth;

Description

Width is a read-only Integer property which contains the horizontal dimension in Pixels for the canvas drawing area. Height and Width determine the limits for the 2-dimensional coordinate system used to access the Pixels on the drawing surface.

The value for the property is determined by calling the GetDeviceSize routine using the Handle for the class instance. The property value is 0 (zero) when Handle has not been assigned (contains 0).

Use Height to get the vertical dimension for the drawing surface.

Changing the value for Height or Width in TCanvas is not allowed. These values are controlled using the capabilities in an image format or output device, and are normally handled in classes which implement the canvas.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.