Look at the TCanvas.pixels property.
If your working with bitmaps (or if you can copy the canvas to a bitmap),
using the TBitmap.scanline property to work with the raw bitmap color values
is recommeded since it much faster.
i.e. this (bad) example which assumes a 24bit bitmap
function getColor (bitmap : TBitmap; x, y : integer) : TColor;
var
scanLine : PByteArray;
r, g, b : cardinal;
begin
scanLine := bitmap.ScanLine [y];
r := scanLine [x * 3 + 0];
g := scanLine [x * 3 + 1];
b := scanLine [x * 3 + 2];
result := b shl 16 + g shl 8 + r;
end;
-----Original Message-----
From: Dedy Darmayanto [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 12:25 PM
To: Multiple recipients of list delphi
Subject: [DUG]: How to get the pixel in windows
Hi,
Any body know, how to get the pixel in wondows
like in DOS.
Before using delphi, in pascal to get pixel used mem[$B800]
what about in delphi
regards,
Dedy
This e-mail message has been scanned and cleared by MailMarshal
www.gen-i.co.nz
This e-mail message has been scanned and cleared by MailMarshal
http://www.gen-i.co.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/