Board index FlightGear Development Canvas

Customizing Styling for MapStructure?

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.

Customizing Styling for MapStructure?

Postby www2 » Tue Apr 21, 2015 11:41 am

This a follow up question from a small PM exchange with Hooray about the svg parser.
Where i ask him do he know how do Customizing MapStructure Styling.

Hooray wrote:it would be better to make this a new thread on the forum - but briefly the idea is to replace the drawVOR() function with a function wrapping parsesvg() - I think artix has got code doing this. Internally, this would still end up in the SymbolCache used by MapStructure.

Feel free to repost your questions and my answer in public, so that others can contribute - if nobody beats me to it, I will post an example or pointer shortly.

Customizing Styling MapStructure is handy for instruments (like the G1000) that have his own set of symbols or ATC radar.
Posts: 261
Joined: Thu Apr 16, 2009 1:58 pm

Re: Customizing Styling for MapStructure?

Postby Hooray » Tue Apr 21, 2015 11:50 am

Here's artix's thread (which includes code snippets/URLs to his work, which does demonstrate how to customize symbology via callbacks and/or SVG files): viewtopic.php?f=71&t=24201

In artix's code this is all encapsulated via the "style" and "options" hashes, so that built-in callbacks can be easily overridden
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: 11437
Joined: Tue Mar 25, 2008 8:40 am

Return to Canvas

Who is online

Users browsing this forum: No registered users and 2 guests