FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 655 : pushMatrix inside beginShape, vertex ignores rotation
Last modified: 2007-10-21 10:56
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
INVALID -
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: 2007-10-21 10:40
rev 130, os-x 10.4 powerbook g4
pushMatrix() inside beginShape(): vertex() seems to ignore the rotation, or can't it be used
that way?
----------------------------------------------------
float rot = 0.0;
void draw ()
{
background(255);
translate( width/2, height/2 );
beginShape();
vertex(0,0);
for ( float rr = 0.0; rr < rot; rr +=0.01 ) {
pushMatrix();
rotate( rr );
// shouldn't these have the same effect?
vertex( 0, 20 );
//vertex( screenX(0,20)-(width/2), screenY(0,20)-(height/2) );
popMatrix();
}
endShape(CLOSE);
rot += 0.2;
}
----------------------------------------------------
the example should draw a pie-chart, uncomment the line with screenXY to see it.
Additional Comment
#1 From fry 2007-10-21 10:42
yep, just like it says in the reference:
http://processing.org/reference/beginShape_.html
;)
Additional Comment
#2 From fjen 2007-10-21 10:56
ouch. stupid me. sorry ...