Board index FlightGear Development Canvas

How to use Canvas

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.

How to use Canvas

Postby VicMar » Sat Jul 07, 2012 8:15 am

Could the developers of Canvas give us a basic instruction manual please.

It would be helpful if we knew where to get the necessary stuff.

Time flies like an arrow
Fruit flies like a banana
User avatar
Posts: 2061
Joined: Sun Apr 06, 2008 5:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: How to use Canvas

Postby TheTom » Sat Jul 07, 2012 9:10 am

There are already some informations in the wiki:

If you want to use the canvas inside aircrafts using some recent 2.8.0 build should be enough, otherwise (eg. for using the canvas on GUI widgets) you need to get the source code from my branch. For using the canvas from Nasal you will need a clone of my fgdata branch (or at least the Nasal/canvas/api.nas). See the c172p-canvas and the gui/dialogs/canvas-demo.xml for some examples.
Posts: 322
Joined: Sun Oct 09, 2011 10:20 am

Re: How to use Canvas

Postby Hooray » Sat Jul 07, 2012 3:52 pm

It is already possible to use the canvas for instruments and HUDs. It will be particularly easy to implement MFD-instruments (airliners, biz jets) and modern glass-cockpit avionics, all of this without having to touch any C++ code, and without having to rebuild FlightGear. ... r_aircraft

The GUI support is a fairly recent addition and hasn't yet been merged into git, so it probably won't be available in the upcoming release unfortunately, even though it's a fairly thin wrapper which doesn't touch any of the existing GUI widgets, it is strictly "opt in" and there's no chance for the canvas to break existing widgets, because the canvas is implemented next to them and not enabled by default.

Until the latest canas code got merged, only people able to build FG from source, will be able to use the Canvas/GUI support

The wiki already contains tons of pointers, and we talked about creating a bunch of howtos and tutorials to illustrate how the system works.
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,
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Posts: 11968
Joined: Tue Mar 25, 2008 8:40 am

Return to Canvas

Who is online

Users browsing this forum: No registered users and 2 guests