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.color property getter.

Returns:

A Color representing the color of the image, or None. The value will be normalized with normalizers.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.data property getter.

Returns:

A bytes object representing the raw byte data of the image or None.

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.transformation property 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.color property setter.

Parameters:

value – The Color to set for the image or None. The value will have been normalized with normalizers.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.data property setter.

Parameters:

value – The bytes object 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.transformation property 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.offset property 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.scale property getter.

Returns:

A tuple of two float items representing the (x, y) scale of the image. The value will have been normalized with normalizers.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:

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 int or a float. The value will have been normalized with normalizers.normalizeRotationAngle.

  • origin – The point at which the rotation should originate as a Coordinate or None. The value will have been normalized with normalizers.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 int or float, or a tuple or list of two int or float values representing the values (x, y). The value will have been normalized with normalizeTransformationScale.

  • origin – The point at which the scale should originate as a Coordinate or None. The value will have been normalized with normalizers.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.offset property 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.scale property setter.

Parameters:

value – The scale to set as a list or tuple of int or float items representing the (x, y) scale of the image. The value will have been normalized with normalizers.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:

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.

BaseImage.copyData(source: BaseObjectType) None

Copy data from source into the current object.

Note

Subclasses may override this method. If so, they should call the super.