[Overview][Constants][Types][Classes][Index] Reference for unit 'ptc' (#ptc)

IPTCSurface.Clear

Clears the contents of a surface to black (or to a specified color).

Declaration

Source position: line 0

procedure IPTCSurface.Clear;

procedure IPTCSurface.Clear(

  AColor: IPTCColor

);

procedure IPTCSurface.Clear(

  AColor: IPTCColor;

  AArea: IPTCArea

);

Arguments

AColor

  

The clear color.

Arguments

AColor

  

The clear color.

AArea

  

The clear area.

Description

Clears the entire contents of (or an area of it, specified by the AArea parameter) the surface to the color specified in the AColor parameter. If the AColor parameter is not specified, the surface is cleared to black in direct color and index zero in indexed color. If the surface pixels are direct color format then the AColor parameter must specify a direct color r, g, b, a value. Conversely if the surface pixels are indexed color then the AColor parameter must specify a color index value. The clear area is clipped to the surface clip area.

Errors

TPTCError - a TPTCError exception is raised on failure.