Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Registering Colours From a Bitmap and/or Image

Author
Message
Turtle Soup
21
Years of Service
User Offline
Joined: 30th Jul 2004
Location: -.-
Posted: 23rd Jan 2007 20:01
erm...right
im making this simple game and im trying to get it to register the colour red, from a bitmap consisting of red circles on a black background, at where the mouse is currently located.

the bit im stuck with is that it doesnt register when this section is in red because its an image as opposed to lines,circles,etc drawn onto the screen

i tried something to do with a pixel pointer but that doesnt seem to work, or maybe im using it wrong



if anyone can help id be well greatful
but thats about as far as my rewarding goes =/
x

if time travel was possible, it would have already happened
Suicidal Sledder
21
Years of Service
User Offline
Joined: 17th Aug 2004
Location: Tikrit, Iraq
Posted: 23rd Jan 2007 20:38


Untested but something like that should work

"See?!?! Port IS left and starboard is RIGHT!!" - Hobbes
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 24th Jan 2007 12:38
It's better to use a thresholds when comparing colours. As the type of display mode your application is running in will effect the results POINT() returns.



Ex (PlayBasic Example Code)



Login to post a reply

Server time is: 2026-07-05 14:11:29
Your offset time is: 2026-07-05 14:11:29