Sign in to follow this  
Followers 0
Mysis

PixelSearch syntax

2 posts in this topic

I need to have pixelsearch search an area of pixels that stretches across the screen and is one pixel tall.

Would I use (I am trying to search the line of pixels at 144):

pixelsearch(0 ,1050, 144, 144, 0x000000)

pixelsearch(0 ,1050, 144, 145, 0x000000)

pixelsearch(0 ,1050, 143, 145, 0x000000)

thanks,

Mysis

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Looks to me like the function expects a rectangle, not a line. But you could find out for youself if it would loop through the line by setting up a test case that contains the searched for color on the line. If not then set up a loop using PixelGetColor() instead.

edit: alternatively, search a rectangle 2 pixels high so that the line you are interested in is searched first. If the found color is on the other line, then color not found. Seems obvious if you just took the time to write a test stub.

Edited by MilesAhead

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0