Project: SWT
Bug 95312 GC.setAntialias breaks stringExtent
Reported: 2005-05-15 10:16:04 | Status: resolved fixed

gc.setAntialias(SWT.ON) causes gc.stringExtent(" ").x == 0 public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); GC gc = new GC (shell); // this prints 5 System.out.println(gc.stringExtent(" ").x); gc.setAntialias(SWT.ON); // this prints 0 System.out.println(gc.stringExtent(" ").x); }

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