Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine2004-12-16 13:04:38 +0000
committerVeronika Irvine2004-12-16 13:04:38 +0000
commit5c9be60b0a60bcb4de5075b6c6a4453a94c33e7d (patch)
treebc67ec570dac37bb1a130be372c44bf59fa60502 /examples
parent561ed0e946df3adf33cc567469815224cf7419ee (diff)
downloadeclipse.platform.swt-5c9be60b0a60bcb4de5075b6c6a4453a94c33e7d.tar.gz
eclipse.platform.swt-5c9be60b0a60bcb4de5075b6c6a4453a94c33e7d.tar.xz
eclipse.platform.swt-5c9be60b0a60bcb4de5075b6c6a4453a94c33e7d.zip
*** empty log message ***
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet168.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet168.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet168.java
index 5b82d00289..4295e50346 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet168.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet168.java
@@ -11,7 +11,7 @@
package org.eclipse.swt.snippets;
/*
- * Draw lines with specific extremities
+ * Draw lines and polygons with different cap and join styles
*
* For a list of all SWT example snippets see
* http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
@@ -28,13 +28,10 @@ public class Snippet168 {
Shell shell = new Shell(display);
shell.addListener(SWT.Paint, new Listener() {
public void handleEvent(Event event) {
+ int x = 20, y = 20, w = 120, h = 60;
GC gc = event.gc;
- gc.setLineWidth(10);
gc.setForeground(display.getSystemColor(SWT.COLOR_BLUE));
- int x = 20;
- int y = 20;
- int w = 120;
- int h = 60;
+ gc.setLineWidth(10);
int[] caps = {SWT.CAP_FLAT, SWT.CAP_ROUND, SWT.CAP_SQUARE};
for (int i = 0; i < caps.length; i++) {
gc.setLineCap(caps[i]);

Back to the top