Fix imageMode(CENTER) and image() with only x/y (bug #1013)

This commit is contained in:
benfry
2008-11-16 13:29:17 +00:00
parent 878e7d1111
commit 1b9cb254cc
3 changed files with 25 additions and 15 deletions

View File

@@ -2273,9 +2273,18 @@ public class PGraphics extends PImage implements PConstants {
// loadImageAsync() sets width and height to -1 when loading fails.
if (image.width == -1 || image.height == -1) return;
imageImpl(image,
x, y, x+image.width, y+image.height,
0, 0, image.width, image.height);
if (imageMode == CORNER || imageMode == CORNERS) {
imageImpl(image,
x, y, x+image.width, y+image.height,
0, 0, image.width, image.height);
} else if (imageMode == CENTER) {
float x1 = x - image.width/2;
float y1 = y - image.height/2;
imageImpl(image,
x1, y1, x1+image.width, y1+image.height,
0, 0, image.width, image.height);
}
}

View File

@@ -1,21 +1,22 @@
0157 core
X SVG polygon shapes not drawing since loadShape() and PShape changes
X http://dev.processing.org/bugs/show_bug.cgi?id=1005
_ image(a, x, y) not honoring imageMode()
_ need to just pass image(a, x, y) to image(a, x, y, a.width, a.height)
_ rather than passing it directly to imageImpl()
_ No textures render with hint(ENABLE_ACCURATE_TEXTURES)
_ http://dev.processing.org/bugs/show_bug.cgi?id=985
_ need to remove the hint from the reference
_ need to throw an error when it's used
X image(a, x, y) not honoring imageMode(CENTER)
X need to just pass image(a, x, y) to image(a, x, y, a.width, a.height)
X rather than passing it directly to imageImpl()
X http://dev.processing.org/bugs/show_bug.cgi?id=1013
_ OPENGL sketches flicker w/ Vista when background() is not used inside draw()
_ http://dev.processing.org/bugs/show_bug.cgi?id=930
_ Disabling Aero scheme prevents the problem
_ Present mode and OPENGL not working in 0156 with Windows Vista
_ http://dev.processing.org/bugs/show_bug.cgi?id=1009
_ -Dsun.java2d.d3d=false seems to fix the problem
_ No textures render with hint(ENABLE_ACCURATE_TEXTURES)
_ http://dev.processing.org/bugs/show_bug.cgi?id=985
_ need to remove the hint from the reference
_ need to throw an error when it's used
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

View File

@@ -1,15 +1,15 @@
0157 pde
X show sketch folder fails for directories containing umlauts
X http://dev.processing.org/bugs/show_bug.cgi?id=1010
X Find in Reference does not open Firefox in 0156 for Linux
X http://dev.processing.org/bugs/show_bug.cgi?id=1012
_ default font on osx 10.5 is gross
_ update to java 6u10 for linux and windows
_ update applet.html to point at java 6u10 with the new auto-update stuff
_ also update applet on the home page to do the same
_ show sketch folder fails for directories containing umlauts
_ http://dev.processing.org/bugs/show_bug.cgi?id=1010
_ disallow add file to sketch if it's an example or read-only
_ if untitled, and not modified, and closing on macosx (only)