20,741
edits
m (→CanvasPDF) |
|||
| 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. | ||