Board index FlightGear Development Canvas

Update to canvas API and SVG parser

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.

Update to canvas API and SVG parser

Postby jsb » Mon Dec 10, 2018 12:35 pm

Available on next now:
additional API methods path.ellipse, path. circle, path.square
SVG parser support for circle and ellipse so you can use those in inkscape, no need to convert them to path in inkscape and lose the specific edit features anymore.

enjoy :)
jsb
 
Posts: 215
Joined: Sat Oct 25, 2014 8:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

Re: Update to canvas API and SVG parser

Postby Hooray » Mon Dec 10, 2018 9:01 pm

Feel free to include the following patch in your next merge request, it adds support for the <image> tag to load raster images directly:

http://wiki.flightgear.org/Howto:Extend ... age.3E_tag
Image

Note that this could be also extended to support other SVG files, too.
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: 11260
Joined: Tue Mar 25, 2008 8:40 am

Re: Update to canvas API and SVG parser

Postby jsb » Sun Dec 23, 2018 7:31 pm

Forgot to mention it here: SVG parser supports <image> tag now, as long as the image is not embedded but linked.
The image file must be in a folder readable for FlightGear, e.g. an aircraft folder or an add-on folder. It is probably best to put the image and the SVG file into the same folder.
jsb
 
Posts: 215
Joined: Sat Oct 25, 2014 8:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux


Return to Canvas

Who is online

Users browsing this forum: No registered users and 2 guests