diff options
author | Silenio Quarti <silenio> | 2003-08-12 18:57:30 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2003-08-12 18:57:30 +0000 |
commit | 790850e31fe45c574533a369fe121cd1ba4684db (patch) | |
tree | 74d2146253995d97fa132111c53487c52203ac2d | |
parent | cd3a491050dbed25020fa49bda02d7c5e979460e (diff) | |
download | eclipse.platform.swt-790850e31fe45c574533a369fe121cd1ba4684db.tar.gz eclipse.platform.swt-790850e31fe45c574533a369fe121cd1ba4684db.tar.xz eclipse.platform.swt-790850e31fe45c574533a369fe121cd1ba4684db.zip |
fixing arc param name
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java index 23ebc22440..50a16bd793 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java @@ -394,7 +394,7 @@ public void dispose() { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ -public void drawArc (int x, int y, int width, int height, int startAngle, int endAngle) { +public void drawArc (int x, int y, int width, int height, int startAngle, int arcAngle) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (width < 0) { x = x + width; @@ -404,36 +404,36 @@ public void drawArc (int x, int y, int width, int height, int startAngle, int en y = y + height; height = -height; } - if (width == 0 || height == 0 || endAngle == 0) { + if (width == 0 || height == 0 || arcAngle == 0) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } if (startAngle > 0) { - if (endAngle > 0) { + if (arcAngle > 0) { //No need to modify start angle. - endAngle += startAngle; + arcAngle += startAngle; } else { int newStartAngle; int newStopAngle = startAngle; - if (startAngle > Math.abs(endAngle)) { - newStartAngle = startAngle - Math.abs(endAngle); + if (startAngle > Math.abs(arcAngle)) { + newStartAngle = startAngle - Math.abs(arcAngle); } else { - newStartAngle = startAngle + 360 - Math.abs(endAngle); + newStartAngle = startAngle + 360 - Math.abs(arcAngle); } startAngle = newStartAngle; - endAngle = newStopAngle; + arcAngle = newStopAngle; } } else { - if (endAngle > 0) { - endAngle = endAngle + startAngle; + if (arcAngle > 0) { + arcAngle = arcAngle + startAngle; startAngle = 360 - Math.abs(startAngle); } else { int newStopAngle = 360 + startAngle; - startAngle = newStopAngle - Math.abs(endAngle); - endAngle = newStopAngle; + startAngle = newStopAngle - Math.abs(arcAngle); + arcAngle = newStopAngle; } } startAngle = (int) (startAngle * 65536 / 360); - endAngle = (int) (endAngle * 65536 / 360); + arcAngle = (int) (arcAngle * 65536 / 360); PhPoint_t center = new PhPoint_t(); center.x = (short)(x + (width / 2)); @@ -446,7 +446,7 @@ public void drawArc (int x, int y, int width, int height, int startAngle, int en try { int prevContext = setGC(); setGCClipping(); - OS.PgDrawArc(center, radii, startAngle, endAngle, OS.Pg_ARC | OS.Pg_DRAW_STROKE); + OS.PgDrawArc(center, radii, startAngle, arcAngle, OS.Pg_ARC | OS.Pg_DRAW_STROKE); unsetGC(prevContext); } finally { if (flags >= 0) OS.PtLeave(flags); @@ -1437,7 +1437,7 @@ public boolean equals (Object object) { * * @see #drawArc */ -public void fillArc (int x, int y, int width, int height, int startAngle, int endAngle) { +public void fillArc (int x, int y, int width, int height, int startAngle, int arcAngle) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (width < 0) { x = x + width; @@ -1447,36 +1447,36 @@ public void fillArc (int x, int y, int width, int height, int startAngle, int en y = y + height; height = -height; } - if (width == 0 || height == 0 || endAngle == 0) { + if (width == 0 || height == 0 || arcAngle == 0) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } if (startAngle > 0) { - if (endAngle > 0) { + if (arcAngle > 0) { //No need to modify start angle. - endAngle += startAngle; + arcAngle += startAngle; } else { int newStartAngle; int newStopAngle = startAngle; - if (startAngle > Math.abs(endAngle)) { - newStartAngle = startAngle - Math.abs(endAngle); + if (startAngle > Math.abs(arcAngle)) { + newStartAngle = startAngle - Math.abs(arcAngle); } else { - newStartAngle = startAngle + 360 - Math.abs(endAngle); + newStartAngle = startAngle + 360 - Math.abs(arcAngle); } startAngle = newStartAngle; - endAngle = newStopAngle; + arcAngle = newStopAngle; } } else { - if (endAngle > 0) { - endAngle = endAngle + startAngle; + if (arcAngle > 0) { + arcAngle = arcAngle + startAngle; startAngle = 360 - Math.abs(startAngle); } else { int newStopAngle = 360 + startAngle; - startAngle = newStopAngle - Math.abs(endAngle); - endAngle = newStopAngle; + startAngle = newStopAngle - Math.abs(arcAngle); + arcAngle = newStopAngle; } } startAngle = (int) (startAngle * 65536 / 360); - endAngle = (int) (endAngle * 65536 / 360); + arcAngle = (int) (arcAngle * 65536 / 360); PhPoint_t center = new PhPoint_t(); center.x = (short)(x + (width / 2)); @@ -1489,7 +1489,7 @@ public void fillArc (int x, int y, int width, int height, int startAngle, int en try { int prevContext = setGC(); setGCClipping(); - OS.PgDrawArc(center, radii, startAngle, endAngle, OS.Pg_ARC_PIE | OS.Pg_DRAW_FILL); + OS.PgDrawArc(center, radii, startAngle, arcAngle, OS.Pg_ARC_PIE | OS.Pg_DRAW_FILL); unsetGC(prevContext); } finally { if (flags >= 0) OS.PtLeave(flags); |