Canvas sandbox: Difference between revisions

Jump to navigation Jump to search
m
Line 214: Line 214:


Next, we need to edit the constructor accordingly, and make sure that the osg::Node is added to the _transform member of the CanvasElement we are creating.
Next, we need to edit the constructor accordingly, and make sure that the osg::Node is added to the _transform member of the CanvasElement we are creating.
That will already give us a new element that renders a PDF file to the Cavas.
[[File:CanvasPDF-prototype.png|thumb|osgpdf demo wrapped in a CanvasElement, showing the FlightGear manual]]


To see how the file name can be changed/updated using properties, it makes sense to open CanvasImage.cxx and check how it is working there, so that we can copy/paste and adapt the code accordingly.
To see how the file name can be changed/updated using properties, it makes sense to open CanvasImage.cxx and check how it is working there, so that we can copy/paste and adapt the code accordingly.

Navigation menu