Re: Shahab: Reading Pixels

"Comboy" <[email protected]>
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <[email protected]>
Hi shahab,
Colors are integers, so to get pixel color do showmessage(inttostr
(canvas.pixels[i,j]));
to get mouse cursor position do:
var
x,y:integer;
begin
x:=mousecursor.position.x;
y:=mousecursor.position.y;

Example:
if canvas.pixels
[mousecursor.position.x,mousecursor.position.y]:=clred then
showmessage('You''ve picked Switzerland!');
But remember, each country must have a different color.
I'm not sure about the codes I'm writing them from my mind, I would 
check them later if there are any errors.(I think you should change 
mousecursor to cursor)

wishes,

comboy


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sO0ANB/LIdGAA/ySSFAA/i7folB/TM
---------------------------------------------------------------------~->

CodeCoffer - new Delphi code protection Tool!
http://www.delphicollection.com/public/CodeCoffer.htm
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
--------------------------------------------------------------- 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.