continuing...

This commit is contained in:
benfry
2004-12-09 23:10:57 +00:00
parent 156ad51347
commit 960d2b3709
3 changed files with 62 additions and 5 deletions

View File

@@ -2696,29 +2696,43 @@ public class PGraphics extends PImage implements PMethods, PConstants {
break;
}
if (depth) {
if (fill) ellipse3_fill(x, y, hradius, vradius);
if (stroke) ellipse3_stroke(x, y, hradius, vradius);
if (depth || !optimize2) {
ellipse3(x, y, hradius, vradius);
} else {
if (fill) ellipse2_fill(x, y, hradius, vradius);
if (stroke) ellipse2_stroke(x, y, hradius, vradius);
ellipse2(x, y, hradius, vradius);
}
}
public void ellipse3(float x, float y, float hradius, float vradius) {
if (fill) ellipse3_fill(x, y, hradius, vradius);
if (stroke) ellipse3_stroke(x, y, hradius, vradius);
}
protected void ellipse3_fill(float x, float y, float h, float v) {
}
protected void ellipse3_stroke(float x, float y, float h, float v) {
}
public void ellipse2(float x, float y, float hradius, float vradius) {
if (fill) ellipse2_fill(x, y, hradius, vradius);
if (stroke) ellipse2_stroke(x, y, hradius, vradius);
}
protected void ellipse2_fill(float x, float y, float h, float v) {
}
protected void ellipse2_stroke(float x, float y, float h, float v) {
}
/*
protected void ellipse_mess(float x, float y,
float hradius, float vradius) {
@@ -2839,6 +2853,7 @@ public class PGraphics extends PImage implements PMethods, PConstants {
} while (y > 0);
}
private final void ellipse0_rough_internal(int centerX, int centerY,
int ellipseX, int ellipseY,
boolean filling) {
@@ -2859,6 +2874,41 @@ public class PGraphics extends PImage implements PMethods, PConstants {
}
//////////////////////////////////////////////////////////////
public void circle(float x, float y, float radius) {
switch (ellipseMode) {
case CENTER_RADIUS:
break;
case CENTER:
radius /= 2f; radius /= 2f;
break;
case CORNER:
radius /= 2f; radius /= 2f;
x += radius; y += radius;
break;
case CORNERS:
radius = (radius - x) / 2f;
radius = (radius - y) / 2f;
x += radius;
y += radius;
break;
}
if (depth || !optimize2) {
ellipse3(x, y, radius, radius);
} else {
circle2(x, y, radius);
}
}
public void circle2(float x, float y, float radius) {
}
/*
private void flat_circle(int centerX, int centerY, int radius) {
// FIXME