Mercurial > projects > dwt2
comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet10.d @ 29:4e5843b771cc
First snippets buildable on windows
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 22 Mar 2009 19:55:00 +0100 |
parents | 69b1fa94a4a8 |
children | ed96ea2a2764 |
comparison
equal
deleted
inserted
replaced
28:69b1fa94a4a8 | 29:4e5843b771cc |
---|---|
37 void main() { | 37 void main() { |
38 Display display = new Display(); | 38 Display display = new Display(); |
39 Shell shell = new Shell(display); | 39 Shell shell = new Shell(display); |
40 shell.setText("Advanced Graphics"); | 40 shell.setText("Advanced Graphics"); |
41 FontData fd = shell.getFont().getFontData()[0]; | 41 FontData fd = shell.getFont().getFontData()[0]; |
42 Font font = new Font(display, fd.getName(), 60., SWT.BOLD | DWT.ITALIC); | 42 Font font = new Font(display, fd.getName(), 60., SWT.BOLD | SWT.ITALIC); |
43 Image image = new Image(display, 640, 480); | 43 Image image = new Image(display, 640, 480); |
44 Rectangle rect = image.getBounds(); | 44 Rectangle rect = image.getBounds(); |
45 GC gc = new GC(image); | 45 GC gc = new GC(image); |
46 gc.setBackground(display.getSystemColor(SWT.COLOR_RED)); | 46 gc.setBackground(display.getSystemColor(SWT.COLOR_RED)); |
47 gc.fillOval(rect.x, rect.y, rect.width, rect.height); | 47 gc.fillOval(rect.x, rect.y, rect.width, rect.height); |