PDA

View Full Version : How to get PixelColor of bitmap under MousePosition



Huehnerschaender
06-10-2004, 09:18 AM
Hello folks,

I have big troubles with getting Pixelcolor under mouseposition as you can see in my last topic.

So I already know that there will be no "fast solution" for the problem with Pixels-function and that's why I open this topic.

Has anyone of you an idea, how I can check if the mouse is over the visible part of a bitmap without using pixels-property?

For a rectangle picture (maybe a rectangle button) it is very easy.
For a circle it is also possible to calculate the position of mouse against boundings of visible part of the bitmap, but what can I do if I have a bitmap (maybe a button) which has no primitive shape? For example a puzzle piece shape or something.

I cannot use the pixels-function to check if the color under mouse is = MaskedColor, so any other idea would be great.

If I can't solve this problem I don't need to go on with my project, because almost every piece of my user interface is not rectangular or circled.

Greetings,
Dirk