Board index FlightGear Development Canvas

Serializing a Canvas to an osg::Image

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Serializing a Canvas to an osg::Image

Postby Hooray » Sun Jun 22, 2014 3:22 pm

We tend to have a lot of screen shots of PUI dialogs that are heavily annotated for use in our docs (manual/wiki), for example see:
Image
Image

Obviously, such screen shots "break" whenever the dialogs are updated, i.e. need to be manually re-created, and annotated again.

If we could extend the Canvas system to get an osg::Image for any canvas, we could easily create such screen shots procedurally and serialize them to disk. GUI dialogs could basically become self-documenting, because we could just annotate a canvas procedurally and write the image to a file that can be used in the manual/wiki
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: Serializing a Canvas to an osg::Image

Postby Johan G » Sun Jun 22, 2014 3:34 pm

That is a very interesting idea that sounds very good. :D
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5513
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Serializing a Canvas to an osg::Image

Postby Hooray » Sun Jun 22, 2014 3:50 pm

In fact, we could even invoke FlightGear when updating the LaTex manual to always create/provide the latest screen shots for each dialog, LaTex has built-in support for calling external programs and for retrieving files/data for inclusion, e.g. images.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11329
Joined: Tue Mar 25, 2008 8:40 am


Return to Canvas

Who is online

Users browsing this forum: No registered users and 13 guests