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.

DarkBASIC Professional Discussion / Need abit of help creating a rubber in my paint program.

Author
Message
Jon4433
15
Years of Service
User Offline
Joined: 22nd Sep 2010
Location:
Posted: 22nd Sep 2010 12:58
So ive made a simple paint program, with 7 colours and a hud, you can draw the different colours on the screen, but i want to take it futher and add more buttons to my interface and im a little bit stuck at my rubber that i thought i would make, so far i have:

Function Rubber()
Ink White, Black
Center Text System.wres*0.88, System.hres*0.91, "Rubber"
Ink Colour, White
Box System.wres*0.86, System.hres*0.93, System.wres*0.90, System.hres*0.99
EndFunction


I also have made the function in the upper code and this simply makes the box, but i got stuck at making the lbutton (Left button) click the erase button and well.. erase whats on the screen, could anybody help me on this please?

Thanks

Jon

Hey im Jon
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 22nd Sep 2010 16:39
But you have paint functions, surely an erasor is pretty much just the same as a paint function - you might set the alpha colour of each pixel when deleting, rather than changing the pixels to the paint colour, but the same principles should apply.

How are you painting so far? - like are you using paste image on a hidden bitmap, or are you using memblocks?

Health, Ammo, and bacon and eggs!
Jon4433
15
Years of Service
User Offline
Joined: 22nd Sep 2010
Location:
Posted: 22nd Sep 2010 18:33
Yes i have the paint functions and i thought the same thing, but it confused me, but im having another go at it and about the painting so far i am using the paste image on a hidden bitmap.

Hey im Jon

Login to post a reply

Server time is: 2026-07-22 12:41:53
Your offset time is: 2026-07-22 12:41:53