StyleBuilder builder = new StyleBuilder();
Style rule = builder.createStyle(builder.createPolygonSymbolizer(Color.RED, Color.BLUE, 1));
image = new Image(display, 16, 16);
SWTGraphics graphics = new SWTGraphics(image, display);
graphics.getGraphics(GC.class).setAntialias(SWT.OFF);
graphics.setBackground(Color.WHITE);
graphics.clearRect(0, 0, 16, 16);
d.drawFeature(graphics, d.feature(d.polygon(new int[]{2, 2, 2, 14, 14, 14, 14, 2, 2, 2})),
new AffineTransform(), rule);
graphics.dispose();
int blue = image.getImageData().palette.getPixel(new RGB(Color.BLUE.getRed(), Color.BLUE
.getGreen(), Color.BLUE.getBlue()));
int red = image.getImageData().palette.getPixel(new RGB(Color.RED.getRed(), Color.RED
.getGreen(), Color.RED.getBlue()));
int white = image.getImageData().palette.getPixel(new RGB(Color.WHITE.getRed(), Color.WHITE