FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1227 : PDF library matrix is not reset between frames
Last modified: 2010-06-05 10:42
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
fjen
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2009-04-09 00:46
in a multiframe pdf export using beginrecord - endrecord the matrix / transforms are not
reset in between frames causing drawings to run offscreen. this is different from the normal
behaviour of draw() where you can assume the transforms are reset to default when it's
entered.
a workaround is to put pushmatrix / popmatrix around any transforms in draw():
import processing.pdf.*;
float rt = 0.0;
float sk = 2.0;
void setup ()
{
size( 800, 800 );
background(255);
beginRecord( PDF, "new.pdf" );
rectMode( CENTER );
}
void draw ()
{
//pushMatrix();
translate( width/2, height/2 );
rotate( rt );
rt += 0.2;
scale( sk );
sk -= 0.1;
rect( 0,0, 200, 200 );
if ( sk < 1 )
{
endRecord();
noLoop();
}
//popMatrix();
}
F
Additional Comment
#1 From fry 2009-04-09 04:43
k, noted.
Additional Comment
#2 From fry 2010-06-05 10:42
fixed for the next release.