public void paint(GC gc, int width, int height) {
	if (!example.checkAdvancedGraphics()) return;
	Device device = gc.getDevice();

	gc.setLineWidth(20);
	gc.setLineJoin(joinValues[joinCb.getSelectionIndex()]);
	
	// set the foreground color or pattern
	Pattern pattern = null;
	if (shapeColor.getBgColor1() != null) {
		gc.setForeground(shapeColor.getBgColor1());
	} else if (shapeColor.getBgImage() != null) {
		pattern = new Pattern(device, shapeColor.getBgImage());
		gc.setForegroundPattern(pattern);
	}
	
	// draw the shape
	Path path = new Path(device);
	path.moveTo(width/2, 25);
	path.lineTo(2*width/3, height/3);
	path.lineTo(width-25, height/2);
	path.lineTo(2*width/3, 2*height/3);
	path.lineTo(width/2, height-25);
	path.lineTo(width/3, 2*height/3);
	path.lineTo(25, height/2);
	path.lineTo(width/3, height/3);
	path.lineTo(width/2, 25);
	path.close();
	gc.drawPath(path);
	path.dispose();
	
	if (pattern != null) pattern.dispose();
}