Image¶
Must Override¶
- BaseImage._get_color() tuple[float, float, float, float] | None[source]¶
Get the native image’s color.
This is the environment implementation of the
BaseImage.colorproperty getter.- Returns:
A Color representing the color of the image, or
None. The value will be normalized withnormalizers.normalizeColor.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseImage._get_data() bytes | None[source]¶
Get the native image’s raw byte data.
This is the environment implementation of the
BaseImage.dataproperty getter.- Returns:
A
bytesobject representing the raw byte data of the image orNone.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseImage._get_transformation() tuple[float, float, float, float, float, float][source]¶
Get the native image’s transformation matrix.
This is the environment implementation of the
BaseImage.transformationproperty getter.- Returns:
A Transformation Matrix value representing the transformation matrix of the image. The value will be normalized with
normalizers.normalizeTransformationMatrix.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseImage._set_color(value: list[int | float] | tuple[float, float, float, float] | None) None[source]¶
Set the native image’s color.
This is the environment implementation of the
BaseImage.colorproperty setter.- Parameters:
value – The Color to set for the image or
None. The value will have been normalized withnormalizers.normalizeColor.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseImage._set_data(value: bytes) None[source]¶
Set the native image’s raw byte data.
This is the environment implementation of the
BaseImage.dataproperty setter.- Parameters:
value – The
bytesobject to set for the image.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
- BaseImage._set_transformation(value: list[int | float] | tuple[float, float, float, float, float, float]) None[source]¶
Set the native image’s transformation matrix.
This is the environment implementation of the
BaseImage.transformationproperty setter.- Parameters:
value – The Transformation Matrix to set. The value will have been normalized with
normalizers.normalizeTransformationMatrix.- Raises:
NotImplementedError – If the method has not been overridden by a subclass.
Important
Subclasses must override this method.
May Override¶
- BaseImage._get_offset() tuple[int | float, int | float][source]¶
Get the native image’s offset.
This is the environment implementation of the
BaseImage.offsetproperty getter.- Returns:
A Coordinate representing the offset of the image. The value will be normalized with
normalizers.normalizeTransformationOffset.
Note
Subclasses may override this method.
- BaseImage._get_scale() tuple[float, float][source]¶
Get the native image’s scale.
This is the environment implementation of the
BaseImage.scaleproperty getter.- Returns:
A
tupleof twofloatitems representing the(x, y)scale of the image. The value will have been normalized withnormalizers.normalizeTransformationScale.
Note
Subclasses may override this method.
- BaseImage._init(*args: Any, **kwargs: Any) None¶
Initialize the native object.
This is the environment implementation of
BaseObject.__init__.- Parameters:
*args – Any positional arguments.
**kwargs – Any keyword arguments.
Note
Subclasses may override this method.
- BaseImage._moveBy(value: list[int | float] | tuple[int | float, int | float], **kwargs: Any) None¶
Move the native object according to the given coordinates.
This is the environment implementation of
BaseObject.moveBy.- Parameters:
value – The x and y values to move the object by as a Coordinate. The value will have been normalized with
normalizers.normalizeTransformationOffset.**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.
- BaseImage._rotateBy(value: float, origin: list[int | float] | tuple[int | float, int | float], **kwargs: Any) None¶
Rotate the native object by the specified value.
This is the environment implementation of
TransformationMixin.rotateBy.- Parameters:
value – The angle at which to rotate the object as an
intor afloat. The value will have been normalized withnormalizers.normalizeRotationAngle.origin – The point at which the rotation should originate as a Coordinate or
None. The value will have been normalized withnormalizers.normalizeCoordinateTuple.**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.
- BaseImage._round() None[source]¶
Round the native image’s offset coordinates.
This is the environment implementation of
BaseImage.round.Note
Subclasses may override this method.
- BaseImage._scaleBy(value: list[int | float] | tuple[float, float], origin: list[int | float] | tuple[int | float, int | float], **kwargs: Any) None¶
Scale the native object according to the given values.
This is the environment implementation of
BaseObject.scaleBy.- Parameters:
value – The value to scale the glyph by as a single
intorfloat, or atupleorlistof twointorfloatvalues representing the values(x, y). The value will have been normalized withnormalizeTransformationScale.origin – The point at which the scale should originate as a Coordinate or
None. The value will have been normalized withnormalizers.normalizeCoordinateTuple.**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.
- BaseImage._set_offset(value: list[int | float] | tuple[int | float, int | float]) None[source]¶
Set the native image’s offset.
This is the environment implementation of the
BaseImage.offsetproperty setter.- Parameters:
value – The offset to set as a Coordinate. The value will have been normalized with
normalizers.normalizeTransformationOffset.
Note
Subclasses may override this method.
- BaseImage._set_scale(value: list[int | float] | tuple[float, float]) None[source]¶
Set the native image’s scale.
This is the environment implementation of the
BaseImage.scaleproperty setter.- Parameters:
value – The scale to set as a
listortupleofintorfloatitems representing the(x, y)scale of the image. The value will have been normalized withnormalizers.normalizeTransformationScale.
Note
Subclasses may override this method.
- BaseImage._skewBy(value: list[int | float] | tuple[float, float], origin: list[int | float] | tuple[int | float, int | float], **kwargs: Any) None¶
Skew the native object by the given value.
This is the environment implementation of
TransformationMixin.skewBy.- Parameters:
value – The value by which to skew the object as either a single
intorfloatcorresponding to the x direction, or atupleof twointorfloatvalues corresponding to the x and y directions. The value will have been normalized withnormalizers.normalizeTransformationSkewAngle.origin – The point at which the rotation should originate as a Coordinate or
None. The value will have been normalized withnormalizers.normalizeCoordinateTuple.**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.
- BaseImage._transformBy(matrix: list[int | float] | tuple[float, float, float, float, float, float], **kwargs: Any) None[source]¶
Transform the native image.
This is the environment implementation of
BaseImage.transformBy.- Parameters:
matrix – The transformation to apply as a Transformation Matrix.
**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.