need help with workaround
in
Programming Questions
•
2 years ago
based on this idea
-
import processing.pdf.*; PGraphics pdf = createGraphics(300, 300, PDF, "output.pdf"); pdf.beginDraw(); pdf.background(128, 0, 0); pdf.line(50, 50, 250, 250); pdf.dispose(); pdf.endDraw();
I'm trying to avoid this problem:
However, i have some code in java files (cause they have to be).
But i have to put pdf in front of things i want to be drawn to the pdf.
Only in my java files i had to send the PApplet with it else it couldn't find pushMatrix for example:
- void display(){
- parent.pushStyle();
- for(NamePart part : nameParts) {
- //parent.textAlign(parent.LEFT, parent.TOP);
- parent.textAlign(align, parent.TOP);
- parent.text(part.name, part.x, part.y);
- }
- parent.popStyle();
- };
However, how do i use the pdf renderer now?
If i try now it says parent.pdf can not be resolved or is not a field.
And if i place pdf in front it says cannot find anything named "pdf"
1