From 2f75538c7522e9ff405a9c7bbabaf77f2f2aa400 Mon Sep 17 00:00:00 2001 From: benfry Date: Mon, 13 Oct 2008 12:30:38 +0000 Subject: [PATCH] fix smoothing issue in java2d (bug #685) --- core/src/processing/core/PGraphics.java | 2 ++ core/todo.txt | 47 +++++++++++++------------ 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index fa62b4603..b03425ee2 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -668,6 +668,8 @@ public class PGraphics extends PImage implements PConstants { protected void defaultSettings() { // ignore // System.out.println("PGraphics.defaultSettings() " + width + " " + height); + noSmooth(); // 0149 + colorMode(RGB, 255); fill(255); stroke(0); diff --git a/core/todo.txt b/core/todo.txt index 34a7b5cc9..6443cf70f 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -149,6 +149,27 @@ X that way, no need to have an error message for every friggin function X PMatrix now PMatrix3D (maybe not yet?) X change svg library reference +hint/unhint/enable/disable +X option to have renderer errors show up +X 1) as text warnings 2) as runtime exceptions 3) never +X add warning system for pgraphics, rather than runtime exceptions +X keep array of warning strings, and booleans for whether they've called +X ENABLE_DEPTH_SORT not really working for GL +X because the zbuffer is still there, it's still calculating +X actually, this is probably because it happens after the frame +X so really, flush is required whenever the depth sort is called +X need to check this--isn't this referring to DISABLE_DEPTH_TEST? +X ENABLE_DEPTH_SORT causing trouble with MovieMaker +X need to make the flush() api accessible +X http://dev.processing.org/bugs/show_bug.cgi?id=692 +X image smoothing +X straighten out default vs. ACCURATE vs. whatever +X Java2D and P3D and OpenGL are all inconsistent +o need to be able to do hint() to do nearest neighbor filtering +X http://dev.processing.org/bugs/show_bug.cgi?id=685 +o imageDetail(), textDetail(), etc? +o decisions on image smoothing vs. text smoothing vs. all + _ random AIOOBE with P3D and points _ http://dev.processing.org/bugs/show_bug.cgi?id=937 @@ -175,28 +196,6 @@ _ may be fixed, but not verified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -hint/unhint/enable/disable -X option to have renderer errors show up -X 1) as text warnings 2) as runtime exceptions 3) never -X add warning system for pgraphics, rather than runtime exceptions -X keep array of warning strings, and booleans for whether they've called -X ENABLE_DEPTH_SORT not really working for GL -X because the zbuffer is still there, it's still calculating -X actually, this is probably because it happens after the frame -X so really, flush is required whenever the depth sort is called -X need to check this--isn't this referring to DISABLE_DEPTH_TEST? -X ENABLE_DEPTH_SORT causing trouble with MovieMaker -X need to make the flush() api accessible -X http://dev.processing.org/bugs/show_bug.cgi?id=692 -_ image smoothing -_ straighten out default vs. ACCURATE vs. whatever -_ Java2D and P3D and OpenGL are all inconsistent -_ need to be able to do hint() to do nearest neighbor filtering -_ http://dev.processing.org/bugs/show_bug.cgi?id=685 -_ imageDetail(), textDetail(), etc? -_ decisions on image smoothing vs. text smoothing vs. all - - createGraphics() and load/updatePixels() mess [1.0] _ text characters showing up as opaque rectangles in tga files _ http://dev.processing.org/bugs/show_bug.cgi?id=641 @@ -254,6 +253,10 @@ _ accessors inside PFont need a lot of work P2D, P3D, PPolygon [1.0] +_ smoothing +_ how to handle smoothing images in P3D even though it has no smoothing? +_ noSmooth() in opengl should switch to nearest neighbor on textures/images +_ same for P3D _ P3D smooshes the top row of pixels when drawing text (or images) _ http://dev.processing.org/bugs/show_bug.cgi?id=466 _ textAlign(CENTER) with P3D and OPENGL produces messy result