Overlay¶
-
class
Overlay¶ -
-
property
name¶ The name of the overlay.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
group¶ The group of the overlay.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
alpha¶ The transparency of the overlay.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.ValueError -- If trying to set a negative alpha value or an alpha value greater than 1.
-
list_layers()¶ List the layers of this overlay, in bottom to top order.
- Returns
The list of layers in the overlay.
- Return type
-
duplicate()¶ Duplicate this overlay.
- Returns
The duplicated overlay.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove(force = False)¶ Delete this overlay
Note
By default, only not used overlay can be deleted (
InUseErroris raised otherwise), useforceto force deletion of used overlays.- Parameters
force (bool) -- Force the deletion of the overlay even if it is in use.
- Raises
InUseError -- If
forceisFalseand the overlay is used.ReadOnlyError -- If
Databaseis in read only mode.
-
create_layer(name)¶ Create a new layer.
- Parameters
name (str) -- The name of the new layer.
- Returns
The newly created layer.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
OverlayLayer¶
-
class
OverlayLayer¶ -
-
property
name¶ The name of the layer.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
index¶ The index of this layer in the layer list.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
visible¶ Whether the layer is visible.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
duplicate()¶ Duplicate this layer.
- Returns
The duplicated layer.
- Return type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
remove()¶ Delete this layer.
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property