GetColor

BlitzMax Forums/BlitzMax Beginners Area/GetColor

Lukasha(Posted 2008) [#1]
Hi.

In Blitzbascx there was a Getcolor-command, that returned the rgb-color of a certain point (x,y). The GetColor-command in BlitzMax only returns the color you set with SetColor..

Is there still a command or the possibility to get the color of a point x,y on the srenn??

Thank you,
lukasha.


degac(Posted 2008) [#2]
http://www.blitzbasic.com/Community/posts.php?topic=47161#524497

http://www.blitzbasic.com/Community/posts.php?topic=56368#626910

http://www.blitzbasic.com/Community/posts.php?topic=49893#554511

PS: use the search forum function, it works well.


tonyg(Posted 2008) [#3]
No command but you can use this
Function getpixelcolor:Int(x:Int,y:Int)
	Local mypix:TPixmap=GrabPixmap(x,y,1,1)
	Return ReadPixel(mypix,0,0)
End Function

<edited> to actually use x/y


Lukasha(Posted 2008) [#4]
Thank you.
It works..