From 3e8558feac6faefb12f2aa5744bae136559680fe Mon Sep 17 00:00:00 2001 From: benfry Date: Sun, 3 Dec 2006 21:31:34 +0000 Subject: [PATCH] fix to java2d so that noSmooth() will shut off image smoothing --- core/src/processing/core/PGraphicsJava2D.java | 6 +++++- core/todo.txt | 10 ++++++++++ todo.txt | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/core/src/processing/core/PGraphicsJava2D.java b/core/src/processing/core/PGraphicsJava2D.java index aed126c8d..bb88a2f52 100644 --- a/core/src/processing/core/PGraphicsJava2D.java +++ b/core/src/processing/core/PGraphicsJava2D.java @@ -977,7 +977,7 @@ public class PGraphicsJava2D extends PGraphics { protected void strokeFromCalc() { super.strokeFromCalc(); strokeColorObject = new Color(strokeColor, true); - strokeGradient = false; + strokeGradient = false; } @@ -1063,12 +1063,16 @@ public class PGraphicsJava2D extends PGraphics { public void smooth() { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, + RenderingHints.VALUE_INTERPOLATION_BICUBIC); } public void noSmooth() { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); + g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, + RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); } diff --git a/core/todo.txt b/core/todo.txt index f9537cfb7..c24c9e16b 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,6 +1,16 @@ 0124 core +X with smooth() turned off, shouldn't be smoothing image on resize +X but on osx, apple defaults the image smoothing to true +X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Programs;action=display;num=1164753510 +X http://developer.apple.com/documentation/Java/Conceptual/JavaPropVMInfoRef/Articles/JavaSystemProperties.html#//apple_ref/doc/uid/TP40001975-DontLinkElementID_6 +_ loadImage() requires an extension, maybe add a second version? +_ loadImage("blah", "jpg"); +_ otherwise people have to use strange hacks to get around it +_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1165174666 +_ having shut off the defaults reset, background not getting called for java2d +_ so this will make that other stuff regress again _ background not being set properly _ http://dev.processing.org/bugs/show_bug.cgi?id=454 _ ARGB problems with createGraphics diff --git a/todo.txt b/todo.txt index 6e1033eb8..c7798830b 100644 --- a/todo.txt +++ b/todo.txt @@ -6,6 +6,12 @@ _ add control for dependencies (i.e. svg needs xml), needed for export _ add "pretty menu name" to the export.txt file _ more export.txt to xml? (nah, it's only flat information) _ need better platform designation setup for libs +_ library installation should use the sketchbook folder, not the p5 folder + +_ PApplet.this doesn't work (does it work in javac?) +_ sketchname.this also doesn't work, because Temporary_NNNN used for name +_ but since it's another tab/class, will run externally +_ so should make the external version use the actual sketch name not temp _ make more fixes to the key bindings _ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc/html/atg_keyboardshortcuts.asp @@ -37,6 +43,7 @@ _ otherwise it's always relative to the original document _ save/restore more of the p5 graphics drawing state _ not setting colorMode(), strokeCap, etc. _ support for text (shouldn't be too bad, use createFont) +_ implement text spans for svg output _ get entity tags working in xml library _ try enabling blending modes _ add better support for attributes buried in styles (support ai9/10/11)