Namespace globals canvas api
FlightGear canvas API Namespace: canvas Classes included: Transform Element Group Map Text Path Image Canvas see also gui.nas
Sub-namespaces
canvas
------------------------------------------------------------------------------- Canvas ------------------------------------------------------------------------------- Class for a canvas not to be confused with the namespace canvas (case sensitive!)
colors
------------------------------------------------------------------------------- colors.nas -------------------------------------------------------------------------------
element
------------------------------------------------------------------------------- canvas.Element ------------------------------------------------------------------------------- Baseclass for all elements on a canvas
group
------------------------------------------------------------------------------- canvas.Group ------------------------------------------------------------------------------- Class for a group element on a canvas
helpers
------------------------------------------------------------------------------- canvas API helper functions -------------------------------------------------------------------------------
image
------------------------------------------------------------------------------- canvas.Image ------------------------------------------------------------------------------- Class for an image element on a canvas
map
------------------------------------------------------------------------------- canvas.Map ------------------------------------------------------------------------------- Class for a group element on a canvas with possibly geographic positions which automatically get projected according to the specified projection. Each map consists of an arbitrary number of layers (canvas groups)
path
------------------------------------------------------------------------------- canvas.Path ------------------------------------------------------------------------------- Class for an (OpenVG) path element on a canvas
svgcanvas
SPDX-License-Identifier: GPL-2.0-or-later NOTE! This copyright does *not* cover user models that use these Nasal services by normal function calls - this is merely considered normal use of the code, and does *not* fall under the heading of "derived work." ------------------------------------------------------------------------------- svgcanvas.nas - base class to populate canvas from SVG and animate elements author: jsb created: 06/2020 ------------------------------------------------------------------------------- Examples: var myCanvas = SVGCanvas.new("mySVG"); myCanvas.loadsvg("myfile.svg", ["foo", "bar"]); to hide/show a SVG element based on a property you can use: var L = setlistener("/controls/foo", myCanvas._makeListener_showHide("foo")); to animate a SVG element you can use: myCanvas["bar"].setTranslation(10,20); -------------------------------------------------------------------------------
text
------------------------------------------------------------------------------- canvas.Text ------------------------------------------------------------------------------- Class for a text element on a canvas
transform
------------------------------------------------------------------------------- Transform ------------------------------------------------------------------------------- A transformation matrix which is used to transform an #Element on the canvas. The dimensions of the matrix are 3x3 where the last row is always 0 0 1: a c e b d f 0 0 1 See http://www.w3.org/TR/SVG/coords.html#TransformMatrixDefined for details. https://www.w3.org/TR/css-transforms-1/#mathematical-description
Functions
get
Get the first existing canvas with the given name @param name Name of the canvas @return #Canvas, if canvas with #name exists nil, otherwise
new
Create a new canvas. Pass parameters as hash, eg: var my_canvas = canvas.new({ "name": "PFD-Test", "size": [512, 512], "view": [768, 1024], "mipmapping": 1 });
wrapCanvas
@param g Canvas ghost
Variables
include_path
FlightGear canvas API Namespace: canvas Classes included: Transform Element Group Map Text Path Image Canvas see also gui.nas