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.
IndexProgramming Questions & HelpSyntax Questions › BGraphics/PGraphics
Page Index Toggle Pages: 1
BGraphics/PGraphics? (Read 529 times)
BGraphics/PGraphics?
Oct 13th, 2007, 10:58am
 
hey there,

can someone help me "translate" this piece of old code to the newer version?

----
 id=param("id");
 img= new BGraphics(width,height);
 img.colorMode(HSB,360);
 trazo=int(random(8));
 nimg=-1;
 cargarImg();
----

the "BGraphics" part is obviously no longer working in processing.
exchanging it with PGraphics and the parameter "null" does not work.
what am i supposed to do?

thanks a lot in advance!
Re: BGraphics/PGraphics?
Reply #1 - Oct 13th, 2007, 11:03am
 
Try:
img=createGraphics(width,height,JAVA2D);
Re: BGraphics/PGraphics?
Reply #2 - Oct 13th, 2007, 11:09am
 
thanks john,
seems to be working now.

now i'll have to take care of the other obsolete parts of the code;)
Re: BGraphics/PGraphics?
Reply #3 - Oct 13th, 2007, 2:22pm
 
see also the changes page in the reference:
http://processing.org/reference/changes.html
Page Index Toggle Pages: 1