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

2012/6/22

Drawing with alpha values

darkmist255 darkmist255

2012/6/22

#
I'm working on making a particle generator (literally no education on the subject, I'm just going at it) but I only have a bit of experience with the Graphics and Graphics2D packages. Is it possible to draw a pixel using a certain alpha(transparency) value for just that pixel? I've looked through both APIs but nothing seems apparent. Edit: I'm now reading on Color, there seems to be mention of Alpha values here. I will update if I find something. Edit: Well, I've tried using "new Color(0, 0, 0, 10)" (the 10 is the alpha value) but it shows up completely black (no transparency)
darkmist255 darkmist255

2012/6/22

#
Alright, I just realized what a dumb mistake I made when coding this. I don't use clear() before drawing, so it takes only a second before it becomes completely black :D.
You need to login to post a reply.