fix to java2d so that noSmooth() will shut off image smoothing

This commit is contained in:
benfry
2006-12-03 21:31:34 +00:00
parent 66c3facfb4
commit 3e8558feac
3 changed files with 22 additions and 1 deletions

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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)