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 & HelpIntegration › PDF export with Eclipse
Page Index Toggle Pages: 1
PDF export with Eclipse (Read 2890 times)
PDF export with Eclipse
Feb 27th, 2007, 1:00am
 
Hi People

From Eclipse, It seems like the pdf library only picks up shapes that are rendered within the main class (extended by PApplet). If I render a shape in a separate object, still within beginRecord() and endRecord(), it does not end up in the pdf file.

This works

beginRecord(PDF, "frame-####.pdf");

ellipse(40, 40, 40, 40);

endRecord();

This does not

beginRecord(PDF, "frame-####.pdf");

myObject.renderAnEllipse();

endRecord();

Is there a way around this or do I have to do all the rendering within the main class?

By the way, how do you marks text as code when posting here?

Carl Emil
Re: PDF export with Eclipse
Reply #1 - Feb 27th, 2007, 1:44pm
 
if you call beginRecord(), then you're calling it on the main drawing surface. if you want to record another graphics context, you'll have to do otherGraphics.beginRecord().

if you're moving to eclipse, you're gonna need to pick up a java book, which covers things like objects, so you know how these bits work. in processing these specifics are hidden because they're less important for sketching/teaching, but if you decide to take the training wheels off, it's gonna be bumpy, and you're gonna have to work harder.
Re: PDF export with Eclipse
Reply #2 - Feb 27th, 2007, 5:34pm
 
Hi Fry

Thanks for the pdf-trick.

I like working in Eclipse because of it's many debugging and refraction features, not to speak of the auto completion of typing. I always wanted to work in Java, so the Processing environment was a perfect starter.

Thanks again
Carl Emil
Page Index Toggle Pages: 1