SHIP:Node:canvas

From Serious Documentation
Revision as of 07:31, 18 March 2015 by Admin (talk | contribs) (Created page with "Node Home __TOC__ {| class="wikitable" style="margin: 1em auto 1em auto;" ! scope="col" | Node Type ! scope="col" | Description |- |<onlyinclude>{{Node|canvas}}...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Node Home

Node Type Description
canvas A RAM-based read-write image area capable of receiving run-time drawing commands.

canvas nodes are targeted for SHIP v5.1 production availability and have limited support in SHIP v5.0. The goal for the canvas system is to support run-time graphing, dynamic loading of images from files into the system, as well as dynamic generation and display of QR codes.

canvas nodes can exist only in the resources area, and can be attached (similar to image nodes) to one or more box nodes in the object property.

The size of the canvas can be larger or smaller than the viewport created by any given box that exposes the canvas, similar to an image in that it is clipped to fit the box inner area, and can be panned/shifted using the offset properties.

Therefore, for example, you can create a canvas many times wider than the box you use to view it and then just manipulate the enabled||Boolean|| If true (default) this node and its children are able to receive events.

Ancestors

The following nodes are permitted to have canvas nodes as descendants:

Node Type Description
group Lightweight node that encloses other nodes for pure organizational benefit, or to create an array of nodes.
resources All reusable items, such as images, are held in the SHIP top-level node defined as the resources node

only where the only ancestors of the canvas node is a series of group nodes under the resources node.

Descendants

The following nodes are permitted within canvases:

Node Type Description
constant Defines a constant value for use in SHIPTide properties or SAIL scripts.
group Lightweight node that encloses other nodes for pure organizational benefit, or to create an array of nodes.

Properties

The following properties are available for the canvas node:

Canvas Properties
Property Data Type Description
name** String The name used to identify this node in SHIPTide.
oh Dimension Height of a box model node.
ow Dimension Width of a box model node.
valign VALIGN Vertical alignment of a box model node within its parent container's inner dimensions.
halign HALIGN Horizontal alignment a box model node within its parent container's inner dimensions.
SHIP:Property:canvas:scalex
SHIP:Property:canvas:scaley
visible Boolean If true (default) this node will be visible iff all direct line parent nodes up to and including the display node are also visible.
opacity Byte Opacity of the displayable node and all its children, grandchildren, etc.

*available at SHIPEngine run time only and cannot be set in SHIPTide. Use a Sail script at shiplaunch time if this property needs to be set when the GUI starts to run.

**available only in SHIPTide; cannot be accessed from Sail scripts at run-time.

Examples