2D lines and polygons antialiasing on Android

Hi!

I am trying to draw 2D antialiased lines and polygons to display music scores. On Android I don’t know how to achieve 2D antialiasing. Or, to be precise, achieve it consistently.

Here are the results on two different devices;

Device 1 (left): mostly ok antialiasing, could be better on the beams.

Device 2 (right): no antialiasing on polygons for system brace, slur and beams, notes and clef are font glyphs.

I have searched the net for information on this issue for a few days, but it seems I haven’t found the right search terms.

I have tried ofEnableAntiAliasing and ofEnableSmoothing to no avail. I am aware of filled polygons not being antialiased, so I draw their contour separately. GLUT is not available on Android, neither is ofCairoRenderer.

Since performance is not a big issue, I wouldn’t mind using a software renderer if I can get a more pleasant aspect.

How would you go around this? Can I enable Cairo on Android or substitute it for another 2D graphic library? Any pointers much appreciated.

Thanks in advance,

L

(If it is relevant, I am using of 0.8.4 in order to support an ancient -in Apple terms- iPod Touch 2G I use for iOS testing.)

(WIP, this is an OF wrapper around GuidoLib which tries to improve on an existing one by Thomas Coffy, it will eventually be published at https://github.com/luisgarrido/preOfxGuido.)

More funny business: if the first device goes to sleep, after awakening it doesn’t perform polygon antialiasing anymore.

Maybe someone can give a tip for the drawing issue,
In my side, I generally use png images instead of drawings for a better visual quality.