From 3ac7858815be503d613d90304ed2d74015c5c969 Mon Sep 17 00:00:00 2001 From: Silenio Quarti Date: Tue, 19 May 2009 18:39:15 +0000 Subject: 276760 - GC#drawRoundRectangle(..) draw too big radii on Cocoa --- .../Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java index 9da1f2b188..3af27f92a6 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java @@ -1472,7 +1472,7 @@ public void drawRoundRectangle(int x, int y, int width, int height, int arcWidth rect.y = y + data.drawYOffset; rect.width = width; rect.height = height; - path.appendBezierPathWithRoundedRect(rect, arcWidth, arcHeight); + path.appendBezierPathWithRoundedRect(rect, arcWidth / 2f, arcHeight / 2f); Pattern pattern = data.foregroundPattern; if (pattern != null && pattern.gradient != null) { strokePattern(path, pattern); @@ -2116,7 +2116,7 @@ public void fillRoundRectangle(int x, int y, int width, int height, int arcWidth rect.y = y; rect.width = width; rect.height = height; - path.appendBezierPathWithRoundedRect(rect, arcWidth, arcHeight); + path.appendBezierPathWithRoundedRect(rect, arcWidth / 2f, arcHeight / 2f); Pattern pattern = data.backgroundPattern; if (pattern != null && pattern.gradient != null) { fillPattern(path, pattern); -- cgit