Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
maskull
maskull's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
noSmooth() with P2D?
[0 Replies]
27-Jan-2011 09:02 PM
Forum:
Programming Questions
Is it possible to disable smoothing with the P2D renderer? E.g., this code (which should switch between smooth/nosmooth on mouse click) never uses nearest-neighbor:
PImage sprite;
void setup()
{
size(256,256,P2D);
background(0);
sprite = loadImage("test.png");
}
boolean smoothing = true;
void draw()
{
background(0);
if(smoothing)
smooth();
else
noSmooth();
image(sprite,0,0,mouseX, mouseY);
}
void mouseClicked()
{
smoothing = !smoothing;
}
It works fine with the JAVA2D renderer, but for what I'm doing the Java2D render is much too slow.
«Prev
Next »
Moderate user : maskull
Forum