diff options
author | Silenio Quarti <silenio> | 2006-03-17 16:14:02 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2006-03-17 16:14:02 +0000 |
commit | 65e89296476125a27ce4d78362eb0992ce10adb9 (patch) | |
tree | a41eb41d80d1cb841388b7c191ecf53cd9850f47 | |
parent | 6de80fba122b036d15b89dceba87de2367adfaf3 (diff) | |
download | eclipse.platform.swt-65e89296476125a27ce4d78362eb0992ce10adb9.tar.gz eclipse.platform.swt-65e89296476125a27ce4d78362eb0992ce10adb9.tar.xz eclipse.platform.swt-65e89296476125a27ce4d78362eb0992ce10adb9.zip |
132271 - fill negative arc
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java | 4 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java index 6d67046e49..70d6b069e7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java @@ -568,7 +568,7 @@ public void drawArc(int x, int y, int width, int height, int startAngle, int arc OS.CGContextTranslateCTM(handle, x + offset + width / 2f, y + offset + height / 2f); OS.CGContextScaleCTM(handle, width / 2f, height / 2f); if (arcAngle < 0) { - OS.CGContextAddArc(handle, 0, 0, 1, (startAngle + arcAngle) * (float)Compatibility.PI / 180, startAngle * (float)Compatibility.PI / 180, true); + OS.CGContextAddArc(handle, 0, 0, 1, -(startAngle + arcAngle) * (float)Compatibility.PI / 180, -startAngle * (float)Compatibility.PI / 180, true); } else { OS.CGContextAddArc(handle, 0, 0, 1, -startAngle * (float)Compatibility.PI / 180, -(startAngle + arcAngle) * (float)Compatibility.PI / 180, true); } @@ -1301,7 +1301,7 @@ public void fillArc(int x, int y, int width, int height, int startAngle, int arc OS.CGContextScaleCTM(handle, width / 2f, height / 2f); OS.CGContextMoveToPoint(handle, 0, 0); if (arcAngle < 0) { - OS.CGContextAddArc(handle, 0, 0, 1, (startAngle + arcAngle) * (float)Compatibility.PI / 180, startAngle * (float)Compatibility.PI / 180, true); + OS.CGContextAddArc(handle, 0, 0, 1, -(startAngle + arcAngle) * (float)Compatibility.PI / 180, -startAngle * (float)Compatibility.PI / 180, true); } else { OS.CGContextAddArc(handle, 0, 0, 1, -startAngle * (float)Compatibility.PI / 180, -(startAngle + arcAngle) * (float)Compatibility.PI / 180, true); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java index 26ddd89588..866eb928c7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java @@ -98,7 +98,7 @@ public void addArc(float x, float y, float width, float height, float startAngle float[] cmt = new float[6]; OS.CGAffineTransformMake(width / 2f, 0, 0, height / 2f, x + width / 2f, y + height / 2f, cmt); if (arcAngle < 0) { - OS.CGPathAddArc(handle, cmt, 0, 0, 1, (startAngle + arcAngle) * (float)Compatibility.PI / 180, startAngle * (float)Compatibility.PI / 180, true); + OS.CGPathAddArc(handle, cmt, 0, 0, 1, -(startAngle + arcAngle) * (float)Compatibility.PI / 180, -startAngle * (float)Compatibility.PI / 180, true); } else { OS.CGPathAddArc(handle, cmt, 0, 0, 1, -startAngle * (float)Compatibility.PI / 180, -(startAngle + arcAngle) * (float)Compatibility.PI / 180, true); } |