layer <assign> { , <assign> ... }
Create a layer identifier and (optionally) assign its value. layer identifiers are references to graphic window layer objects.
<assign>
<ident> { = <layer> }
<ident>
The name of the layer identifier.
<layer>
Another layer identifier.
None
Every graphic window has a number of graphic layers associated with it, details of which are accessible via a layer array: window.layers[].
A new graphic window initially has a default layering system comprising 3 layers: a background layer, a default vector layer associated with the all group of entities, and a layer for autotext annotation. The background layer is merely for the convenience of accessing and controlling the background color or fillstyle.
Every layer within a graphic window has an index, starting at 1. Window contents are redrawn in layer order. A layer identifier merely points to an index within a particular window. Care should therefore be taken because if a window's layer order changes, any layer identifiers poiting to a particular layer may now point to a different layer because the layer order has changed.
If a window layer pointed to by a layer identifier is removed or no longer exists, the value of the layer identifier will be treated as null.
Create a new un-initialized layer.
layer my_layer
Create a new layer, set it to point to the background layer of a graphic window.
layer b = gwin.background_layer
Create a new layer, set it to point to the 3rd layer of a graphic window.
layer b = gwin.layers[3]
Create a new layer, set it point to a window's vector layer corresponding to a particular group.
layer layerPOI = gwin.vector_layer(poi_group)
Create a new layer, set it point to another layer.
layer my_layer = layerPOI
Commands: |
|
Structures: |