Jump to content

PixelSearch syntax


Mysis
 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...