String text = GraphicsExample.getResourceString("SWT"); //$NON-NLS-1$
Font font = new Font(device, "Times", 200, SWT.NORMAL);
gc.setFont(font);
Point size = gc.stringExtent(text);
path.addString(text, (width - size.x) / 2, (height - size.y) / 2, font);
font.dispose();
gc.setClipping(path);
path.dispose();
break;
case 4: // star
path = new Path(device);