1from __future__
import annotations
9 Class representing opacity for painting operations. Opacity indicates how much the underlying layer is hidden.
11 A value of 100 means that the underlying layer is completely hidden. On the other hand, 0 means that the layer is
14 @ingroup ids_peak_icv_python_painting
15 @since ids_peak_icv 1.1
20 def __init__(self, value: int = MAXIMUM) ->
None:
23 Creates an Opacity object with a default value of 100.
25 @param value: (int, optional) Value of the Opacity. Defaults to maximum.
27 @exception OutOfRangeException: If the opacity value is not within the valid range.
29 @since ids_peak_icv 1.1
32 raise OutOfRangeException(f
"Opacity value must be between {self.MINIMUM} and {self.MAXIMUM}")
39 Retrieve the current opacity.
41 @return The current opacity value.
43 @since ids_peak_icv 1.1
47 def __eq__(self, other: object) -> bool:
50 Check if the Opacity object is equal to a given value.
52 @param other: Value to compare with.
54 @return True if equal, False otherwise.
56 @since ids_peak_icv 1.1
58 if not isinstance(other, Opacity):
61 return self.
_value == other
Thrown when a value is outside the allowed range.
Class representing opacity for painting operations.
bool __eq__(self, object other)
Check if the Opacity object is equal to a given value.
None __init__(self, int value=MAXIMUM)
Creates an Opacity object with a default value of 100.
int value(self)
Retrieve the current opacity.