Hi Jeremy, On Wed, Nov 12, 2008 at 3:41 PM, Jeremy Moles <[EMAIL PROTECTED]> wrote: > Your implementation of the CairoImage class is probably right on track > with the simplest, cleanest way of supporting a Cairo "surface" to draw > on.
CairoImage is just an experiment so far. I went for the absolute minimum glue code, which actually is tiny, thumbs up to the Cairo for being so simple to integrate. My thought is that if CairoImage looks like a good base then we could provide it with osgWidget, either with optional compilation of the implementation in the src/osgWidget directory, or just having the class interface and implementation all in the header. The later approach would mean that osgWidget itself needn't compile against Cairo at all - it'd only be the utilities/plugins that require it that would include the header and there fore require Cairo. A third but more complex approach would be to have the implementation of CairoImage loaded as a plugin, the complexity is something I'd rather avoid though. > We'll need to support (and I'm willing to add this on after you commit > it intially) all of the CAIRO_FORMAT_* args in the "real" > implementation, but that's not hard--just requires settings the > pixelFormat and whatnot. Would this mean adding a format parameter into the existing create() method that I have written and having a map between CAIRO_FORMAT and OSG_FORMAT. At what times is the RGBA format not appropriate? > How did you avoid not having to use a fully formed URI? In my code, I > had to use file:/// syntax, or Poppler refused to cooperate. It could be > a library version difference, so we'll need to keep an eye on this... This same uri problem bit me too. Have a look at the code and you find that I use osgDB::getRealPath() to get the absolut path of the file, then I prepend "file:" to create the final uri with seems to work fine - so far. It'll be interesting to see what happens under Windows. > In the example code I'm using (svn update about 20 mins ago) the > PageHandler object isn't being added to the viewer event handlers... PageHandler isn't use right now and incomplete so is not used. The code is just experimental, me hope right now is to find out whether it works across platforms. Once I get more feedback and have a bit more time to reflect on the needs of the interface and implementation I'll refactor the PDF support to clean it up, at this time the osgpdf example can become a bit more refined too. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org