Anchor

Must Override

BaseAnchor._get_color() tuple[float, float, float, float] | None[source]

Get the native anchor’s color.

This is the environment implementation of the BaseAnchor.color property getter.

Returns:

A Color representing the color of the anchor,

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.

BaseAnchor._get_identifier() str | None

Get the native object’s unique identifier.

This is the environment implementation of IdentifierMixin.identifier.

If the native object does not have an identifier assigned, one may be assigned with IdentifierMixin.getIdentifier

Returns:

The unique identifier assigned to the object as a str, or None indicating the object has no identifier.

Raises:

NotImplementedError – If the method has not been overridden by a subclass.

Important

Subclasses must override this method.

BaseAnchor._get_name() str | None[source]

Get the native anchor’s name.

This is the environment implementation of the BaseAnchor.name property getter.

Returns:

A str representing the name of the anchor, or None. The value will have been normalized with normalizers.normalizeAnchorName.

Raises:

NotImplementedError – If the method has not been overridden by a subclass.

Important

Subclasses must override this method.

BaseAnchor._get_x() int | float[source]

Get the native anchor’s x-coordinate.

This is the environment implementation of the BaseAnchor.x property getter.

Returns:

An int or a float representing the x-coordinate of the anchor. The value will be normalized with normalizers.normalizeX.

Raises:

NotImplementedError – If the method has not been overridden by a subclass.

Important

Subclasses must override this method.

BaseAnchor._get_y() int | float[source]

Get the native anchor’s y-coordinate.

This is the environment implementation of the BaseAnchor.y property getter.

Returns:

An int or a float representing the x-coordinate of the anchor. The value will be normalized with normalizers.normalizeY.

Raises:

NotImplementedError – If the method has not been overridden by a subclass.

Important

Subclasses must override this method.

BaseAnchor._set_color(value: list[int | float] | tuple[float, float, float, float] | None) None[source]

Set the native anchor’s color.

Description

This is the environment implementation of the BaseAnchor.color property setter.

Parameters:

value – The Color to set for the anchor 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.

BaseAnchor._set_name(value: str | None) None[source]

Set the native anchor’s name.

This is the environment implementation of the BaseAnchor.name property setter.

Parameters:

value – The name to set as a str or None. The value will have been normalized with normalizers.normalizeAnchorName.

Raises:

NotImplementedError – If the method has not been overridden by a subclass.

Important

Subclasses must override this method.

BaseAnchor._set_x(value: int | float) None[source]

Set the native anchor’s x-coordinate.

This is the environment implementation of the BaseAnchor.x property setter.

Parameters:

value – The x-coordinate to set as an int or a float. The value will have been normalized with normalizers.normalizeX.

Raises:

NotImplementedError – If the method has not been overridden by a subclass.

Important

Subclasses must override this method.

BaseAnchor._set_y(value: int | float) None[source]

Set the native anchor’s y-coordinate.

This is the environment implementation of the BaseAnchor.y property setter.

Parameters:

value – The y-coordinate to set as an int or a float. The value will have been normalized with normalizers.normalizeY.

Raises:

NotImplementedError – If the method has not been overridden by a subclass.

Important

Subclasses must override this method.

May Override

BaseAnchor._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.

BaseAnchor._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.

BaseAnchor._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.

BaseAnchor._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.

BaseAnchor._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.

BaseAnchor._transformBy(matrix: list[int | float] | tuple[float, float, float, float, float, float], **kwargs: Any) None[source]

Transform the native anchor according to the given matrix.

This is the environment implementation of BaseAnchor.transformBy.

Parameters:

Note

Subclasses may override this method.

BaseAnchor.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.