Canvas Element

From FlightGear wiki
Revision as of 21:05, 10 November 2013 by BotFlightGear (talk | contribs) (Use Nasal highlighter)
Jump to navigation Jump to search


A handful of rendering primitives are available to draw on a canvas. Properties (see Property Tree for general information on FlightGear's property system) are used to control the appearance and behaviour of such Elements.

Properties

z-index

  • Format: <number> (Integer)
  • Default: 0

Change order in which elements are drawn. Elements with higher z-index are drawn later and cover allready drawn elements on overlapping parts.

# Draw before all elements (if no z-index of the other elements is lower than zero)
el.set("z-index", -1);

# Ensure el2 is drawn before/below el1
el1.set("z-index", 51);
el2.set("z-index", 50);