Color¶
Inheritance diagram¶
Classes¶
Color¶
-
class
ORSModel.ors.Color¶ Bases:
ORSModel.ors.Unmanagedbrief_description: Wraps and defines colors. author: N Mongeau All other members of ORS participated. version: 1.0 date: December 2015 Defines a color. Colors are composed of components, each stored in the form of a double between 0 and 1. Colors can have as many components as wanted, but slots 0 to 3 are reserved for red, green, blue and alpha. Any additional component should thus be stored starting at index 4.
-
class
OPACITY_FLAG¶ Bases:
enum.IntEnumAn enumeration.
-
HIDDEN_OPACITY= 0¶
-
IN_RANGE_OPACITY= -1¶
-
OUT_RANGE_OPACITY= 2¶
-
-
createFromPythonRepresentation(aPythonRepresentation: str) → Color¶ Create an OrientedPlane from a python representation a static method.
Parameters: aPythonRepresentation (str) – Returns: output (ORSModel.ors.Color) –
-
fromQColor(qColor)¶
-
getAlpha(self) → float¶ Gets the alpha component of the color.
Note
Color components are expressed as values between 0 and 1.
Returns: output (float) – the alpha value (a double)
-
getAsQColor()¶
-
getBlue(self) → float¶ Gets the blue component of the color.
Note
Color components are expressed as values between 0 and 1.
Returns: output (float) – the blue value (a double)
-
getClassNameStatic() → str¶ getClassNameStatic
Returns: output (str) –
-
getComponentAtIndex(self, index: int) → float¶ Gets a component of the color.
Note
Color components are expressed as values between 0 and 1.
Note
Color components indexes are zero-based.
Parameters: index (int) – the component index (a uint16_t) Returns: output (float) – a double value
-
getComponentCount(self) → int¶ Gets the number of component of the color.
Returns: output (int) – the component count (a uint16_t)
-
getComponents(self) → ArrayDouble¶ Gets all the components of the color.
Note
Color components are expressed as values between 0 and 1.
Returns: output (ORSModel.ors.ArrayDouble) – a double array (an ArrayDouble)
-
getGreen(self) → float¶ Gets the green component of the color.
Note
Color components are expressed as values between 0 and 1.
Returns: output (float) – the green value (a double)
-
getIsEqualTo(self, aColor: ORSModel.ors.Color) → bool¶ Checks for equality to another color.
Parameters: aColor (ORSModel.ors.Color) – a color (a Color) Returns: output (bool) – true if the colors are equal, false otherwise
-
getRed(self) → float¶ Gets the red component of the color.
Note
Color components are expressed as values between 0 and 1.
Returns: output (float) – the red value (a double)
-
setAlpha(self, alpha: float) → None¶ Sets the alpha component of the color.
Note
Color components are expressed as values between 0 and 1.
Parameters: alpha (float) – the alpha value (a double)
-
setBlue(self, blue: float) → None¶ Sets the blue component of the color.
Note
Color components are expressed as values between 0 and 1.
Parameters: blue (float) – the blue value (a double)
-
setComponentAtIndex(self, index: int, component: float) → None¶ Sets a component of the color.
Note
Color components are expressed as values between 0 and 1.
Note
Color components indexes are zero-based.
Parameters: - index (int) – the component index (a uint16_t)
- component (float) – a double value
-
setComponents(self, components: ORSModel.ors.ArrayDouble) → None¶ Sets all the components of the color.
Note
Color components are expressed as values between 0 and 1.
Parameters: components (ORSModel.ors.ArrayDouble) – a double array (an ArrayDouble)
-
setGreen(self, green: float) → None¶ Sets the green component of the color.
Note
Color components are expressed as values between 0 and 1.
Parameters: green (float) – the green value (a double)
-
setRed(self, red: float) → None¶ Sets the red component of the color.
Note
Color components are expressed as values between 0 and 1.
Parameters: red (float) – the red value (a double)
-
class
Unmanaged¶
-
class
ORSModel.ors.Unmanaged Bases:
ORSModel.ors.ORSBaseClassbrief_description: Abstract class for objects that are not managed by the core library. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
atomicLoad(sFilename: str) → Unmanaged Creates an object from a file where an object was saved.
Parameters: sFilename (str) – path of the file to load Returns: output (Unmanaged) – a managed object, or none() if the load fails
-
atomicSave(self, aFilename: str) → int Saves the object to a file.
Parameters: aFilename (str) – path of the file to save Returns: output (int) – 0 if successful, otherwise an error code
-
createFromPythonRepresentation(aPythonRepresentation: str) → Unmanaged Create aUnmanaged Object from a python representation a static method.
Parameters: aPythonRepresentation (str) – Returns: output (ORSModel.ors.Unmanaged) –
-
fromPythonRepresentation(self, aPythonRepresentation: str) → bool Create aUnmanaged object from a Python string representation.
Parameters: aPythonRepresentation (str) – a Python evaluable string representation (a string) Returns: output (bool) – TRUE if parsing worked, FALSE otherwise (a bool)
-
classmethod
getAllSubclasses(outputCollection=None)
-
classmethod
getClassDenomination()
-
static
getClassFromProgId(progId)
-
getClassName(self) → str Retrieves the class name of the core object wrapped by this Interface object.
Returns: output (str) –
-
getClassNameStatic() → str getClassNameStatic
Returns: output (str) –
-
getDataChecksum(self) → str Returns: output (str) –
-
getIsInstanceOf(self, pProgId: str) → bool Queries the object to know if it is an instance of a certain class.
Parameters: pProgId (str) – Returns: output (bool) –
-
classmethod
getIsSubclassOf(parentClass)
-
getPythonRepresentation(self) → str Gets a Python evaluable string representation.
Returns: output (str) –
-
isNone(self) → bool Checks if the receiver is none.
Returns: output (bool) –
-
isNotNone(self) → bool Checks if the receiver is not none.
Returns: output (bool) –
-
none() → Unmanaged Returns: output (Unmanaged) –
-
ORSBaseClass¶
-
class
ORSModel.ors.ORSBaseClass brief_description: An abstract class from which all objects issued from the author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
getPythonTraceBack() → typing.List[str] Set the python traceback for a call from python.
Returns: output (typing.List[str]) –
-
isManaged(self) → bool Returns: output (bool) –
-
isNone(self) → bool Returns: output (bool) –
-
setPythonTraceBack(tb: ORSModel.ors.typing.List[str]) → None Set the python traceback for a call from python.
Parameters: tb (typing.List[str]) –
-