TSCARBitmap.GetPixels

From SCAR Divi Manual
Jump to: navigation, search

Definition

Member of TSCARBitmap.
function TSCARBitmap.GetPixels(const TPA: TPointArray): TIntArray;

Availability

SCAR Divi 3.37 > Current

Description

Returns a TIntArray with the colors found on the bitmap at all of the given coordinates in the TPointArray TPA. If a coordinate in TPA is outside of the bitmap's boundaries, the method will throw an exception.

Example

var
  TPA: TPointArray; 
  Bmp: TSCARBitmap;

begin
  TPA := RandomTPA(100, 100, 100);   
  Bmp := BmpFromTPA(TPA, clGreen, clBlack);
  try                 
    WriteLn(TIAToStr(Bmp.GetPixels(TPA)));
  finally
    Bmp.Free;
  end;
end.

See Also