Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java')
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java
index 9dc68324bc..c5b71711aa 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java
@@ -57,18 +57,18 @@ public String getDescription() {
@Override
public void paint(GC gc, int width, int height) {
- int centerX = width / 2;
- int centerY = height / 2;
- int pos = 0;
- for (int i = 0; i < POINTS; ++i) {
- double r = Math.PI*2 * pos/POINTS;
- radial[i*2] = (int)((1+Math.cos(r))*centerX);
- radial[i*2+1] = (int)((1+Math.sin(r))*centerY);
- pos = (pos + POINTS/2) % POINTS;
- }
+ int centerX = width / 2;
+ int centerY = height / 2;
+ int pos = 0;
+ for (int i = 0; i < POINTS; ++i) {
+ double r = Math.PI*2 * pos/POINTS;
+ radial[i*2] = (int)((1+Math.cos(r))*centerX);
+ radial[i*2+1] = (int)((1+Math.sin(r))*centerY);
+ pos = (pos + POINTS/2) % POINTS;
+ }
gc.setFillRule(fillRuleCb.getSelectionIndex() != 0 ? SWT.FILL_WINDING : SWT.FILL_EVEN_ODD);
gc.setBackground(gc.getDevice().getSystemColor(SWT.COLOR_YELLOW));
- gc.fillPolygon(radial);
- gc.drawPolygon(radial);
+ gc.fillPolygon(radial);
+ gc.drawPolygon(radial);
}
}

Back to the top