Page 1 of 1

How to test If two objects are the same colour???

Posted: Thu Mar 06, 2014 7:40 pm
by Fasasoftware
Hi to everybody,

I would like to test in my program ...how i can verify 2 objects like a red rectangle (graphic) and an white image but not in full in white...with some part coloured with other colour... are the same colour or not....And i would like to know..if i can test only a portion of image with a rectangle....in other word i would like to test two objects with 2 specified spots are the same colour or not...

I have tryed with intersect function...but it was a bad idea......

Can you help me please??? i thank you a lot in advance....

Best regards,

Lestroso :oops:

Re: How to test If two objects are the same colour???

Posted: Thu Mar 06, 2014 9:30 pm
by dunbarx
I have forgotten how to set the loc of the cursor. But when we find out how to do that, you can call the "mouseColor". Now you can get the color of any pixel, or of any point inside a control.

Anyone?

Craig Newman

Re: How to test If two objects are the same colour???

Posted: Thu Mar 06, 2014 9:40 pm
by bn
how to set the loc of the cursor
screenMouseLoc

Kind regards

Bernd

Re: How to test If two objects are the same colour???

Posted: Thu Mar 06, 2014 10:08 pm
by Fasasoftware
I thank you a lot....very very very much!!!! Now i will try your suggestions....thank a lot very much i appriciate so much.....

Best regards,

Lestroso :D

Re: How to test If two objects are the same colour???

Posted: Fri Mar 07, 2014 12:52 am
by dunbarx
Ah, right, Bernd. Thanks.

So Lestroso, you see you can lock the screen, save the current cursor loc, send the cursor to any point on the card, even referencing certain parts of certain controls on that card, get your color info and restore the cursor to its original position.

Craig

Re: How to test If two objects are the same colour???

Posted: Mon Mar 10, 2014 12:04 pm
by jmburnod
Hi All,
There is a mousecolor bug with MontainsLion.
http://forums.runrev.com/phpBB2/viewtop ... mousecolor
best regards
Jean-Marc