Howto:Extend the Canvas SVG module: Difference between revisions

Jump to navigation Jump to search
Line 237: Line 237:
The switch element evaluates the ''requiredFeatures'', ''requiredExtensions'' and ''systemLanguage'' attributes on its direct child elements in order, and then processes and renders the first child for which these attributes evaluate to true. All others will be bypassed and therefore not rendered. If the child element is a container element such as a <g>, then the entire subtree is either processed/rendered or bypassed/not rendered.
The switch element evaluates the ''requiredFeatures'', ''requiredExtensions'' and ''systemLanguage'' attributes on its direct child elements in order, and then processes and renders the first child for which these attributes evaluate to true. All others will be bypassed and therefore not rendered. If the child element is a container element such as a <g>, then the entire subtree is either processed/rendered or bypassed/not rendered.


 
In FlightGear, this could for example be used to automatically render a background image or a set of buttons for avionics that are shown in a GUI dialog instead of the 3D cockpit.
 






[[Category:Canvas SVG]]
[[Category:Canvas SVG]]

Navigation menu