Sign in Join
FPDoc Onlineexperiment

TCanvas.GetColor function

Member of TCanvasprotectedIn unit Graphics

Gets the Color for the pixel at the given coordinates as a TFPColor value.

Declaration

pascal
function GetColor(x: Integer; y: Integer): TFPColor; override

Arguments

x

Horizontal position for the pixel.

y

Vertical position for the pixel.

Function result

TFPColor value for the pixel at the specified position.

Description

Uses the indexed Pixels property to retrieve the color information for the pixel at the coordinates in x and y. Calls TColorToFPColor to convert the TColor value to the TFPColor type used in the return value.

See also

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