From f055bb3dc7fc7656b394c1b73f14599edad217db Mon Sep 17 00:00:00 2001 From: benfry Date: Thu, 20 Nov 2008 15:31:57 +0000 Subject: [PATCH] fix a handful of P2D issues --- core/src/processing/core/PGraphics2D.java | 12 +++++++----- core/todo.txt | 18 ++++++++++++++++-- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/core/src/processing/core/PGraphics2D.java b/core/src/processing/core/PGraphics2D.java index 3d2158c40..213b30c45 100644 --- a/core/src/processing/core/PGraphics2D.java +++ b/core/src/processing/core/PGraphics2D.java @@ -424,10 +424,12 @@ public class PGraphics2D extends PGraphics { if (stroke) { draw_lines(vertices, vertexCount-1, 1, 1, 0); - // draw the last line connecting back to the first point in poly - svertices[0] = vertices[vertexCount-1]; - svertices[1] = vertices[0]; - draw_lines(svertices, 1, 1, 1, 0); + if (mode == CLOSE) { + // draw the last line connecting back to the first point in poly + svertices[0] = vertices[vertexCount-1]; + svertices[1] = vertices[0]; + draw_lines(svertices, 1, 1, 1, 0); + } } } else { // not convex //System.out.println("concave"); @@ -908,7 +910,7 @@ public class PGraphics2D extends PGraphics { protected void rectImpl(float x1f, float y1f, float x2f, float y2f) { - if (ctm.isWarped()) { + if (smooth || strokeAlpha || ctm.isWarped()) { // screw the efficiency, send this off to beginShape(). super.rectImpl(x1f, y1f, x2f, y2f); diff --git a/core/todo.txt b/core/todo.txt index 6419dccb2..b0177bf5c 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,15 +1,24 @@ 0158 core -X arc() broken in P2D +X beginShape(TRIANGLE_FAN), and therefore arc(), broken in P2D X also a typo in the ColorWheel example X http://dev.processing.org/bugs/show_bug.cgi?id=1019 +X P2D - null pointer exception drawing line with alpha stroke +X http://dev.processing.org/bugs/show_bug.cgi?id=1023 +X P2D endShape() is working like endShape(CLOSE) +X http://dev.processing.org/bugs/show_bug.cgi?id=1021 +X http://dev.processing.org/bugs/show_bug.cgi?id=1028 (mark as dupe) +X arc() center transparent +X http://dev.processing.org/bugs/show_bug.cgi?id=1027 +X mark as dupe of bug #200 +. . . _ Writing XML files (clean up the API) _ http://dev.processing.org/bugs/show_bug.cgi?id=964 _ 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 +_ Disabling Aero scheme prevents the problem (maybe?) _ 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 @@ -100,6 +109,8 @@ _ http://dev.processing.org/bugs/show_bug.cgi?id=806 _ accessors inside PFont need a lot of work _ osx 10.5 (not 10.4) performing text width calculation differently _ http://dev.processing.org/bugs/show_bug.cgi?id=972 +_ Automatically use textMode(SCREEN) with text() when possible +_ http://dev.processing.org/bugs/show_bug.cgi?id=1020 P2D, P3D, PPolygon [1.0] @@ -289,6 +300,7 @@ _ happens when the rectangle is flipped on the x or y axis _ probably a hack that draws the "last" point differently _ beginShape() _ better lockout inside beginShape() to keep other things from happening +_ http://dev.processing.org/bugs/show_bug.cgi?id=1022 _ don't allow you to draw stroked items unless stroke() is called _ don't allow beginShape() if shape is already set _ (otherwise will cause some very strange errors) @@ -641,3 +653,5 @@ _ textFont() is null on beginRecord _ same would be the case for strokeWeight, background, etc. _ http://dev.processing.org/bugs/show_bug.cgi?id=346 _ repeating texture support +_ exactly how should pixel filling work with single pixel strokes? +_ http://dev.processing.org/bugs/show_bug.cgi?id=1025