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.
IndexSuggestions & BugsWebsite,  Documentation,  Book Bugs › createGraphics example code doesn't work
Page Index Toggle Pages: 1
createGraphics example code doesn't work (Read 1097 times)
createGraphics example code doesn't work
Jul 26th, 2006, 9:18pm
 
The example code for createGraphics does not work.  

http://processing.org/faq/advanced.html#big

Quote:
Creating Bitmap Images

   * The basic way to create bitmap images is to use the saveFrame() function.
   * If you want to create a really large scene and write that, first make sure that you've allocated a lot of memory.
   * If you want to create images that are larger than the screen, you should create your own PGraphics object, draw to that, and use save(). For now, it's best to use P3D in this scenario. P2D is currently disabled, and the JAVA2D default will give mixed results. So for instance:
Code:

PGraphics big;

void setup() {
big = createGraphics(3000, 3000, P3D);

big.beginDraw();
big.background(128);
big.line(20, 1800, 1800, 900);
// etc..
big.endDraw();

// make sure the file is written to the sketch folder
String path = savePath("big.tif");
big.save(path);
}



here's the error message I'm getting:

Quote:
/tmp/build34252.tmp/Temporary_754_4716.java:6:3:6:17: Semantic Error: No accessible method with signature "beginDraw()" was found in type "processing.core.PGraphics".

/tmp/build34252.tmp/Temporary_754_4716.java:10:3:10:15: Semantic Error: No method named "endDraw" was found in type "processing.core.PGraphics". However, there is an accessible method "endRaw" whose name closely matches the name "endDraw".
Re: createGraphics example code doesn't work
Reply #1 - Jul 27th, 2006, 9:28pm
 
sorry, the faq pages were updated too soon--that was an in-progress version of the FAQ that made its way to the site. not sure why that happened, but i'll have to roll it backwards.

edit -- the correct version of the faq has returned.
Re: createGraphics example code doesn't work
Reply #2 - Jul 28th, 2006, 7:39am
 
Ok, now that page is just plain missing Wink
Re: createGraphics example code doesn't work
Reply #3 - Jul 28th, 2006, 3:04pm
 
right, cuz that stuff isn't worked out just yet.
Page Index Toggle Pages: 1