SCREEN_SPACE fonts fixed, threading fixes, bezierVertex fixes

This commit is contained in:
benfry
2005-03-25 17:23:55 +00:00
parent a197de6d1a
commit d169aa4228
5 changed files with 49 additions and 8 deletions

View File

@@ -158,7 +158,8 @@ public class PGraphics2 extends PGraphics {
case LINE_STRIP:
case LINE_LOOP:
if (vertexCount == 1) {
if (gpath == null) {
//if (vertexCount == 1) {
gpath = new GeneralPath();
gpath.moveTo(x, y);
} else {
@@ -274,7 +275,8 @@ public class PGraphics2 extends PGraphics {
case POLYGON:
case CONCAVE_POLYGON:
case CONVEX_POLYGON:
if (vertexCount == 1) {
//if (vertexCount == 1) {
if (gpath == null) {
//System.out.println("starting poly path " + x + " " + y);
gpath = new GeneralPath();
gpath.moveTo(x, y);
@@ -311,7 +313,9 @@ public class PGraphics2 extends PGraphics {
case POLYGON:
case CONCAVE_POLYGON:
case CONVEX_POLYGON:
if (splineVertexCount == 1) {
//if (splineVertexCount == 1) {
if (gpath == null) {
gpath = new GeneralPath();
gpath.moveTo(x, y);
} else if (splineVertexCount >= 4) {
@@ -332,6 +336,17 @@ public class PGraphics2 extends PGraphics {
}
public void beginShape(int kind) {
super.beginShape(kind);
// set gpath to null, because when mixing curves and straight
// lines, vertexCount will be set back to zero, so vertexCount == 1
// is no longer a good indicator of whether the shape is new.
// this way, just check to see if gpath is null, and if it isn't
// then just use it to continue the shape.
gpath = null;
}
public void endShape() {
//System.out.println("endShape");