Project: SWT
Bug 95617 Fill rules ignored with GDI+
Reported: 2005-05-17 13:59:35 | Status: resolved fixed

turn on antialias. fill rules get ignored. public static void main(String[] args) { Display display = new Display(); final Shell shell = new Shell(display); shell.setText("Shell"); shell.addPaintListener(new PaintListener() { int POLY[] = new int[] {5, 5, 45, 5, 20, 30, 20, 20, 45, 45, 5, 45}; public void paintControl(PaintEvent e) { e.gc.setAntialias(0); e.gc.setBackground(e.gc.getForeground()); e.gc.setFillRule(SWT.FILL_WINDING); e.gc.fillPolygon(POLY); } }); shell.setSize(500, 380); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/gdip/Gdip.java