TGML Layers: <Layer>

The Layer element is a container element used to create layered TGML graphics.

Only the TGML root element can contain Layer elements, which means that nested layers are not supported.

Layer elements cannot be transformed. Child transformation elements will have no effect on the Layer element.

Attribute Type Description

Opacity

Double

A value between 0.0 (transparent) and 1.0 (opaque).
Default: "0"
Inheritable: No
Animatable: Yes

Visibility Visibility

Specifies if the element is visible or not.
Default: "Visible"
Inheritable: No
Animatable: Yes

Example:

Copy
<TGML Width="400" Height="250">

    <Layer Name="Background">
        <Image Left="0" Tcp="0" Width*"400" Height="250">
            < ! [CDATA[iVBORw0KGgoAAAANSUh...SWORK5CYII=] ]>
        </Image>
    </Layer>

    <Layer Name="Foreground">
        <Line Xl="75.0" Yl="50.0" X2="325.0" Y2="75.0” Stroke="#FF0000" StrokeWidth="2.0"/>
        <Polyline Points="50.0,100.0 150.0,75.0 175.0,125.0 150.0,200.0 75.0,125.0" Stroke="#0000FF"/>
        <Polygon Points="200.0,125.0 350.0,100.0 325.0,150.0 350.0,200.0 250.0,175.0" Stroke="#00FF00" Fill="#FFFF00" /> 
    </Layer>

</TGML>