Bug 413240 - Implement support for SWT CAIRO_ANTIALIAS_SUBPIXEL
Summary: Implement support for SWT CAIRO_ANTIALIAS_SUBPIXEL
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux-GTK
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2013-07-18 08:15 EDT by Sylvain MOUQUET CLA
Modified: 2018-11-30 11:16 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain MOUQUET CLA 2013-07-18 08:15:38 EDT
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
Comment 1 Eric Williams CLA 2018-11-30 11:16:46 EST
I would be happy to review any patches for this sort enhancement.