Community
Participate
Working Groups
Hi, In the class org.eclipse.swt.graphics.GC, it's not possible to use Cairo.CAIRO_ANTIALIAS_SUBPIXEL in the method setAntialias : public void setAntialias(int antialias) { 3046 if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); 3047 if (data.cairo == 0 && antialias == SWT.DEFAULT) return; 3048 int mode = 0; 3049 switch (antialias) { 3050 case SWT.DEFAULT: mode = Cairo.CAIRO_ANTIALIAS_DEFAULT; break; 3051 case SWT.OFF: mode = Cairo.CAIRO_ANTIALIAS_NONE; break; 3052 case SWT.ON: mode = Cairo.CAIRO_ANTIALIAS_GRAY; 3053 break; 3054 default: 3055 SWT.error(SWT.ERROR_INVALID_ARGUMENT); 3056 } 3057 initCairo(); 3058 long /*int*/ cairo = data.cairo; 3059 Cairo.cairo_set_antialias(cairo, mode); 3060} it's possible to add it ? cf http://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg07546.html "Please open a enhancement bug report for this. It probably requires new SWT API (a new constant -> SWT.SUBPIXEL). I quickly looked and it seems it would only make sense on GTK/Cairo. There is no equivalent on GDI+ and Cocoa. Another possibility is to add a constant SWT.BEST which maps to CAIRO_ANTIALIAS_SUBPIXEL on cairo and it is the same as SWT.ON on the other platforms." Thanks, Sylvain
I would be happy to review any patches for this sort enhancement.