TSCARBitmap.GetPixels

From SCAR Divi Manual
Revision as of 12:24, 11 November 2012 by Freddy (talk | contribs) (Created page with "==Definition== Member of TSCARBitmap.<source lang="scar" lines="false"> function TSCARBitmap.GetPixels(const TPA: TPointArray): TIntArray; </source> ==Availability== SCAR...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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