Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT CAIRO_ANTIALIAS_SUBPIXEL

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.

Silenio



From:        sylvain mouquet <sylvain.mouquet@xxxxxxxxx>
To:        platform-swt-dev@xxxxxxxxxxx,
Date:        07/17/2013 04:54 AM
Subject:        [platform-swt-dev] SWT CAIRO_ANTIALIAS_SUBPIXEL
Sent by:        platform-swt-dev-bounces@xxxxxxxxxxx




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 ?

Thanks,
Sylvain
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top