fix for bug #1090, noStroke() ignored with point() in P2D and JAVA2D

This commit is contained in:
benfry
2009-02-20 00:54:57 +00:00
parent 5871d9c964
commit 7a5ebf648f
3 changed files with 20 additions and 17 deletions
+10 -8
View File
@@ -258,14 +258,16 @@ public class PGraphics2D extends PGraphics {
switch (shape) {
case POINTS:
// stroke cannot change inside beginShape(POINTS);
if ((ctm.m00 == ctm.m11) && (strokeWeight == 1)) {
for (int i = 0; i < vertexCount; i++) {
thin_point(vertices[i][TX], vertices[i][TY], strokeColor);
}
} else {
for (int i = 0; i < vertexCount; i++) {
float[] v = vertices[i];
thick_point(v[TX], v[TY], v[TZ], v[SR], v[SG], v[SB], v[SA]);
if (stroke) {
if ((ctm.m00 == ctm.m11) && (strokeWeight == 1)) {
for (int i = 0; i < vertexCount; i++) {
thin_point(vertices[i][TX], vertices[i][TY], strokeColor);
}
} else {
for (int i = 0; i < vertexCount; i++) {
float[] v = vertices[i];
thick_point(v[TX], v[TY], v[TZ], v[SR], v[SG], v[SB], v[SA]);
}
}
}
break;
@@ -466,10 +466,12 @@ public class PGraphicsJava2D extends PGraphics /*PGraphics2D*/ {
public void point(float x, float y) {
if (strokeWeight > 1) {
line(x, y, x + EPSILON, y + EPSILON);
} else {
set((int) screenX(x, y), (int) screenY(x, y), strokeColor);
if (stroke) {
if (strokeWeight > 1) {
line(x, y, x + EPSILON, y + EPSILON);
} else {
set((int) screenX(x, y), (int) screenY(x, y), strokeColor);
}
}
}
+4 -5
View File
@@ -10,17 +10,16 @@ X http://dev.processing.org/bugs/show_bug.cgi?id=958
X the fix has been found, just incorporate it
X thanks to dave bollinger
_ add a note about this to the changes file
X OutOfMemoryError with ellipse() in P3D and OPENGL
X http://dev.processing.org/bugs/show_bug.cgi?id=1086
X point(x,y) ignores noStroke() (in some renderers)
X http://dev.processing.org/bugs/show_bug.cgi?id=1090
xml
X fix for xml elements that have null names
X added listChildren() method
X added optional toString(boolean) parameter to enable/disable indents
X OutOfMemoryError with ellipse() in P3D and OPENGL
X http://dev.processing.org/bugs/show_bug.cgi?id=1086
P4 _ point(x,y) ignores noStroke() (in some renderers)
P4 _ http://dev.processing.org/bugs/show_bug.cgi?id=1090
_ if no draw() method, and renderer is not displayable, then exit
_ static mode PDFs shouldn't just hang