FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1182 : smooth() has no effect in offscreen PGraphicsJava2D
Last modified: 2009-03-03 06:54
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:
davbol
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2009-03-01 09:21
1.0.3, included JRE, WinXPsp3
Apologies if this is a dup of something else, tho it appears most other smooth() -
related bugs in 2d are marked resolved, so perhaps this one just slipped through the
cracks?
With 1.0.3 the code below will produce an antialiased image for the onscreen g, but
not for the offscreen g. Contrast with beta 0148 where both images are antialiased
(same code):
size(200,200,JAVA2D);
smooth();
background(0);
stroke(255);
line(0,0,width,height);
save("onscreen.png");
PGraphics offscreen = createGraphics(width,height,JAVA2D);
offscreen.smooth(); // no effect?
offscreen.beginDraw();
offscreen.background(0);
offscreen.stroke(255);
offscreen.line(0,0,width,height);
offscreen.endDraw();
offscreen.save("offscreen.png");
Additional Comment
#1 From fry 2009-03-03 06:54
put smooth() after beginDraw(). don't call functions on the surface outside
begin/endDraw.