Namespace globals canvas MapStructure
MapStructure mapping/charting framework for Nasal/Canvas, by Philosopher See: http://wiki.flightgear.org/MapStructure
Classes
CachedElement
wrapper for each cached element: keeps the canvas and texture map coordinates for the corresponding raster image.
DotSym
Implementation for a particular type of symbol (for the *.symbol files) to handle details.
MultiSymbolLayer
A layer that manages a list of symbols (using delta positioned handling with a searchCmd to retreive placements).
NavaidSymbolLayer
A layer that manages a list of statically-positioned navaid symbols (using delta positioned handling with a searchCmd to retrieve placements). This is not yet supposed to work properly, it's just there to help get rid of all the identical boilerplate code in lcontroller files, so needs some reviewing and customizing still
OverlayLayer
Base class for a OverlayLayer, e.g. a TileLayer
RasterSymbol
wrapper for symbols based on raster images (i.e. PNGs) TODO: generalize this and port WXR.symbol accordingly
SVGSymbol
Small wrapper for DotSym: parse a SVG on init().
StyleableCacheable
A class to mix styling and caching. Using the above helpers it serializes style hashes.
Symbol
A base class for Symbols placed on a map. Note: for the derived objects, the element is stored as obj.element. This is also part of the object's parents vector, which allows callers to use obj.setVisible() et al. However, for code that manipulates the element's path (if it is a Canvas Path), it is best to use obj.element.addSegmentGeo() et al. for consistency.
SymbolLayer
Base class for a SymbolLayer, e.g. MultiSymbolLayer or SingleSymbolLayer.
Functions
call_draw
Drawing functions have the form: func(group) { group.createChild(...).set<Option>(<option>); ... } The style is passed as (essentially) their local namespace/variables, while the group is a regular argument.
default_hash
Combine a specific hash with a default hash, e.g. for options/df_options and style/df_style in a SymbolLayer.
style_string
Serialize a style into a string.
try_aux_method
Try to call a method on an object with no arguments. Should work for both ghosts and hashes; catches the error only when the method doesn't exist -- errors raised during the call are re-thrown.
unescape
Helpers for below
Variables
SymbolCache32x32
set up a cache for 32x32 symbols (initialized below in load_MapStructure)
denied_symbols
Excerpt from gen module
supported_ghosts
to add support for additional ghosts, just append them to the vector below, possibly at runtime: