1
0
Fork 0
Commit graph

55 commits

Author SHA1 Message Date
Stuart Buchanan
d84c527ca7 Canvas MapLayers for Airport
Add RWY, TAXI, TWR, PARKING map layers
Add new static position controller
Update Select Airport dialog to use new MapLayers.
2017-10-13 17:38:27 +01:00
Stuart Buchanan
85b7665c19 Add Canvas Map Support for Slippy Map
- Include OSM and OpenAIP in the canvas-map dialog.
2017-09-28 15:38:03 +01:00
Thorsten Renk
1fad428a27 Special purpose faster canvas text setting methods 2017-03-19 16:23:35 +02:00
James Turner
51e2ddc8ba Revert "Use new canvas Path rect/SVG support."
Don't use the built-in SVG/rect parser, since this bypasses creating
coordinate / command properties which some Canvas users rely upon.

This reverts commit 57a2d21ddf.
2017-01-23 17:51:39 +00:00
James Turner
57a2d21ddf Use new canvas Path rect/SVG support. 2016-12-16 19:34:16 +00:00
artix
a6fe054946 Airbus style for MapStructure/navdisplay 2015-06-06 12:29:36 +02:00
Torsten Dreyer
f3058a3f2e Canvas: add support for stroke-linejoin 2014-08-26 00:06:59 +02:00
Philosopher
2c3f457281 MapStructure: avoid flickering labels/paths 2014-06-24 14:21:14 -05:00
Thomas Geymayer
c3a65442b1 canvas.gui: Update for core changes and use new layouting system 2014-06-03 19:30:30 +02:00
Philosopher
f0d44ae8fe Lots lots more MapStructure changes
Fix the main bugs, add features and convert most of the layers.
Move/refactor some things as well. Add a canvas map dialog next to the
built-in one -- it's not 100% functional but it's quite close actually.

As before, the excitement has been taking place at our team clone.
https://gitorious.org/fg/canvas-hackers-fgdata/commits/0b4cc84
(topics/canvas-map-dialog branch this time, current HEAD in above URL.)
2014-05-25 14:27:11 -05:00
Philosopher
37c005c222 Many MapStructure/NavDisplay updates
See the clone at https://gitorious.org/fg/canvas-hackers-fgdata/source/topics/canvas-radar:
2014-04-28 21:39:00 -05:00
Philosopher
6e17a1d2cb Initial Nasal REPL work (canvas-based)
Features:
- Various configurable styles.
- Working scroll bars, thanks to Tom
- Adequate REPL-ness.

See the wiki for more information!
http://wiki.flightgear.org/Interactive_Nasal_Console

N.B. This makes some (sane) changes to other Nasal files, including
expanding some of the Canvas API.
2014-04-18 16:49:11 -05:00
Thomas Geymayer
a5401c19c7 canvas: update for new bounding box getters. 2014-03-31 13:34:50 +02:00
Thomas Geymayer
e593ee2c30 canvas.gui: Update for 'file'->'src' rename. 2014-03-20 11:46:48 +01:00
Thomas Geymayer
313175b943 canvas: add helper to get translation of canvas.Elements. 2014-03-19 23:51:19 +01:00
Thomas Geymayer
bab393aa0c Canvas/SVG parser: fix bounding box and rotation center.
- Calculate bounding box after adding all children.
 - Apply rotation after all SVG defined rotations to use correct
   center of rotation (as defined in Inkscape)

This (together with the SimGear and FlightGear commits) fixes
the core problems of #1333.
2014-02-08 00:43:13 +01:00
Philosopher
73c21e0df4 Remove canvas.Map.df_controller 2014-02-02 12:25:45 -06:00
Philosopher
4a2dab6f21 Canvas ND: small tweaks 2014-01-27 20:53:46 -06:00
Philosopher
a4f289ecee Canvas ND: Do del() on reinit
This also makes sure the /canvas/by-index/canvas[3/4]/ nodes are removed
and then recrated, as well as making sure the MapStructure del() path is
followed and working. Unfortunately the NDs are still blank after reinit.
2014-01-23 21:21:49 -06:00
Thomas Geymayer
e7900e3791 Canvas: remove API for FlightGear 2.8
The old API is not used with newer versions of FG. If an old
version of FG is used, also the according version of fgdata
should be used, which also includes the correct API wrappers.
2014-01-20 23:25:15 +01:00
Philosopher
7ca8482b07 MapStructure work & (partial) integration
In time for 3.0. The API is still not fully complete, and not fully
cleaned up, but this is good enough for this release cycle (and it
should offer benefit longer term, if not now -- hopefully performance as
well).

Many thanks to Hooray as well, who has helped prepare things while I
could not, and often suggested ideas.
2014-01-09 21:24:22 -06:00
Gijs de Rooy
a9576e8c8d Canvas Navigational Display:
- get rid of global variables and use instance variables
- identified all important drawing routines and move them into *.draw files
- changed to dynamic loading of *.draw *.model and *.layer files
- implemented poor-man's controller hash to move use-case specific conditionals out of the draw files, and back into the instantiation, i.e. Gijs' EFIS class
- started identifying stuff that is not specific to drawing, but to what is to be drawn, i.e. Model stuff - such as positioned queries, moved those out into *.model files
- some more work on supporting more than a single ND MFD instance per aircraft
- renamed a handful of SVG identifiers to avoid naming conflicts and to simplify usage of SVG IDs as member fields
- moved all of the setlistener setup out of the fdm-initialized stub right into the ctor of the Efis class (actually that's controller stuff...)
- initial MapStructure framework
- aircraft-agnostic NavDisplay class
- preparations for deprecating map.nas
- additions to canvas.map
- preparations for making NDStyles configurable via XML
2013-12-01 13:36:23 +01:00
Thomas Geymayer
9687784128 Canvas API: constants for clip-frame reference frames 2013-11-03 21:01:33 +01:00
Thomas Geymayer
5f54a68491 Canvas: add helper to get parent of canvas.Element 2013-10-23 17:33:12 +02:00
Thomas Geymayer
589d021e1c Canvas API: access to canvas "desktop". 2013-07-25 01:02:37 +02:00
Thomas Geymayer
eaf4c60cfb Canvas GUI: don't drag window on close button. 2013-06-29 14:49:43 +02:00
Thomas Geymayer
d7d871cc83 Canvas API: do not skip first index for cmds/coords
Start cmd/coord indices really at 0 and allow removing first/last
segment.
2013-06-27 23:16:45 +02:00
Thomas Geymayer
72e3937ec6 Basic window decorator with title bar and close button.
Extend the canvas.Window class to create a simple window decoration
if a type for it (currently every type maps to the same style) is
given. It supports moving the window by dragging inside the title
bar and setting a window title.
2013-06-06 23:27:11 +02:00
Thomas Geymayer
bf3cd83c61 Canvas API: allow passing image size as vector 2013-03-09 14:03:32 +01:00
Thomas Geymayer
71f3f878c6 SVG rect rounded corner and refactor rect helper 2013-02-23 19:19:53 +01:00
Thomas Geymayer
0bb3a1fe95 Remove CanvasText space hack.
With corrected alginment calculations within latest SimGear this
hack is not needed anymore.
2013-02-09 12:25:28 +01:00
Thomas Geymayer
4374ab0ce8 Use new built-in string functions 2013-01-31 22:56:43 +01:00
Thomas Geymayer
91ae186330 Canvas API: draw (rounded) rect and rename Dialog to Window.
- std.string:
   * Add method compare
   * Add method starts_with
 - canvas.Group:
   * Add method rect for drawing (rounded) rectangles
 - Rename canvas.Dialog to canvas.Window to free the name Dialog
   for real dialogs.
2013-01-22 18:02:20 +01:00
Thomas Geymayer
73fcf429d0 Canvas/SVG fix calculating transformation center (Group) 2013-01-09 12:14:31 +01:00
Thomas Geymayer
530db2e97a Ensure canvas dialogs clean up all references to canvas ghosts on destruction 2013-01-01 13:16:19 +01:00
Thomas Geymayer
ccee791529 Canvas API: Use more exposed core functions 2012-11-30 17:40:03 +01:00
Thomas Geymayer
10c635752a Use latest core API and fix FG 2.8 support 2012-11-18 23:29:24 +01:00
Thomas Geymayer
bc63ff3ea8 Use Canvas and CanvasGroup ghosts provided by fgfs core 2012-11-16 12:35:49 +01:00
Thomas Geymayer
fa97e5ea7a Use core Canvas Nasal helpers 2012-11-15 14:19:09 +01:00
Thomas Geymayer
7477ffed74 Update Canvas API for latest core changes 2012-11-04 15:15:11 +01:00
Thomas Geymayer
7f1117a537 Use new props.addChildren method to speed up 'Select Aiport' dialog 2012-10-14 17:33:31 +02:00
Thomas Geymayer
a15d582937 Use newly exposed props.Node.addChild method 2012-10-13 15:20:27 +02:00
Hooray
e510c8917f Canvas Scripting Layer (Mapping):
- first stab at refactoring the map.nas module, and trying to let the API evolve according to our requirements
- split up the module into separate files (some of them will disappear soon)
- split up the "drawing" loops into separate functions so that they can be individually called
- move actual "drawing" to map_layers.nas
- introduce some OOP helpers to prepare a pure Layer-based design
- prepare helpers: LayeredMap, GenericMap, AirportMap (TODO: use a real "Layer" class)
- move airport features (taxiways, runways, parking, tower) to separate layers (i.e. canvas groups)
- avoid using a single update callback and use different layer-specific callbacks to update individual layers more efficiently
- add some boilerplate hashes to prepare the MVC design
- allow lazy updating of layers, where canvas groups are only populated on demand, to save some time during instantiation, i.e. loading an airport without "parking" selected, will only populate the layer once the checkbox is checked
- extend the original code such that it supports showing multiple airports at once
- add some proof of concept "navaid" layer using SVG files for navaid symbols (added only NDB symbol from wikimedia commons)

regressions:
- runway highlighting needs to be re-implemented
- parking highlighting will be done differently
- enforcing a specific drawing order for layers is currently not explicitly supported, so that taxiways may be rendered on top of runways

Also:

- integrated with the latest changes in git/master (HEAD) -i.e. metar support
- further generalized map.nas
- partially moved instantiation from Nasal space to XML space (WIP)
- create "toggle layer" checkboxes procedurally in Nasal space
- prepared the code to be better reusable in other dialogs (e.g. route manager, map dialog etc)
- completely removed the "highlighting" (runway/parking) feature for now, because we talked about re-implementing it anyhow
2012-09-29 21:16:31 +01:00
Thomas Geymayer
5650e97397 Canvas: Bounding box may not exist 2012-09-25 22:20:39 +02:00
Thomas Geymayer
86344dfe57 Canvas: Add method to retrieve all child elements of a group. 2012-09-17 18:16:30 +02:00
Thomas Geymayer
a4af6530e1 Canvas: Fix cubic/scubic typo. 2012-09-04 22:54:53 +02:00
Thomas Geymayer
16890bb5b8 Canvas: Experimental backward support for FlightGear 2.8 2012-09-01 22:37:25 +02:00
Thomas Geymayer
52b89ed372 Canvas: Update API for core changes.
- Use only one node for colors and dash-array
 - Update some property names to better match SVG/CSS
2012-08-23 21:05:52 +02:00
Thomas Geymayer
20c6d48ee7 Canvas: Basic GUI API and API cleanup 2012-08-12 23:25:47 +02:00
Thomas Geymayer
a129877eb8 Canvas: Add function to API for getting canvas path 2012-08-09 22:08:44 +02:00