This site requires JavaScript, please enable it in your browser!
Greenfoot back
Handgottes
Handgottes wrote ...

2020/4/27

Drawings

Handgottes Handgottes

2020/4/27

#
So right now at the moment i tried to program a paint like program. I have some problems, first of all i don´t know how to make a scanner like thing where it ask the user what coulour and transpery he wants his drawing to have. Second i dont know how to make an eraser as the remove obejcts command does not remove the drawing for me but the actor. ( I tried to select GreenfootImage as class but he says that this wouldn´t be possible) It would be very nice if you could help.
danpost danpost

2020/4/27

#
Are you drawing onto the image of an actor or onto the background of the world?
Handgottes Handgottes

2020/4/27

#
onto the background of the world
danpost danpost

2020/4/27

#
Okay. First thing to realize is that the background of the world must remain entirely opaque (or unwanted images may appear within it). So, transparencies would be out of the question unless you use an Actor image for the canvas. As far as scanner, are you wanting a control panel or a pop-up control? As far as erasing, you would probably have to go pixel by pixel to change an area of the image. If erasing rectangular areas only, there may be a way to code it more easily, but it might take more processing time.
Handgottes Handgottes

2020/4/27

#
Regarding to scanner i want a control panel And for the eareaser , I have the problems that oval shape are there too, is there really no possibilieity to erase colors or soemthing?` For the transperencie , so I jsut have to insert an blank photo as background and than it is possible?
danpost danpost

2020/4/27

#
Handgottes wrote...
Regarding to scanner i want a control panel
All you would need are the settings for the color parts and an small image depicting the currently set color.
And for the eareaser , I have the problems that oval shape are there too, is there really no possibilieity to erase colors or soemthing?`
The latter might help with this as well.
For the transperencie , so I jsut have to insert an blank photo as background and than it is possible?
You can draw an opaque image or set the drawing color of the background to its base color (Color.WHITE, unless you changed it) and then use fillOval or fillRect.
Handgottes Handgottes

2020/4/28

#
okay thank you, i try to do it that way
You need to login to post a reply.