We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
createGraphics() (Read 685 times)
createGraphics()
Apr 20th, 2006, 11:04am
 
Four suggestions regarding the same method:

1 - Having a default createGraphics(int width, int height) that uses the renderer used in the applet.

2 - Having an even more default createGraphics() that uses the same size and renderer as in the applet.

3 - Having the createGraphics(...) methods return a PGraphicsXXX object that has already been initialized (called the defaults() method)

4 - The defaults() method should set all pixels to completely transparent.  At least in the createGraphics().  I think it's much more intuitive.  Even the main canvas of the applet could have all the pixels transparent (alpha = 0) at initialization.  (I know this is a delicate suggestion, but since we're still in the BETA I think it's time to discuss these things).
Re: createGraphics()
Reply #1 - Apr 20th, 2006, 4:40pm
 
Agreed.. I've fumbled with these functions alot myself, and I vote yes on all of those suggestions.

One thing is that i can't manage to get a PGraphics2 that i can draw on.. even with defaults() turned on.. I wish to use this to be able to enable smooth() on just parts of a sketch.

-seltar
Re: createGraphics()
Reply #2 - May 2nd, 2006, 12:09am
 
#1 is already in there.

#2-4 are things i'd like to do, but they're nasty and difficult to get them working properly, and that's why they've not been implemented yet, or implemented that way in the first place.
Page Index Toggle Pages: 1