[osg-users] osgCairo: draw curves on top of image

Riccardo Corsi riccardo.corsi at vrmmp.it
Thu Nov 5 10:44:40 PST 2009

Hi all,

I'm trying to use the nice osgCairo library to draw some curves on top of an
 I wasn't able to to that, because after loading an osgCairo::image with
data coming from an osg::Image, whatever path I stroke or fill on it, it's
used as a mask, instead of draw on top of it ( see attached image,
screenshot of a modified osgCairoViewer)
 Is there a way to achieve what I'm looking for?

I've also found a possible issue/bug under Windows: the image colors don't
match between osg and cairo.
You may notice it slightly in the screenshot of osgcairoViewer provided here
by Jean-Sebastien (almost white, it's difficult to notice)
I made it more evident with another image in the attached screenshot.
For the image to look fine I had to swap some colors, like RGBA -> BGRA,
despites of what the cairo settings state in the viewer example

If you give me some pointers, I can try to take a look into the code and see
if I can fix it.

Thank you,

Riccardo Corsi
(t) +39 011 56 97 227
(f) +39 011 56 97 219
Virtual Reality & Multi Media Park SpA
C.so Lombardia, 194 10149 Torino (It)
C.F./P.I. 07844090014
C.S. deliberato € 2.220.240,80 - sottoscritto € 1.965.941,20 - versato €
Reg. Impr. TO-07844090014
R.E.A. 924212
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091105/9419babd/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osgCairo_color_swap.jpg
Type: image/jpeg
Size: 63222 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091105/9419babd/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osgCairo_path.jpg
Type: image/jpeg
Size: 47401 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091105/9419babd/attachment-0003.jpg>

More information about the osg-users mailing list