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.colorproperty getter.- Returns:
- 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, orNoneindicating 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.nameproperty getter.- Returns:
A
strrepresenting the name of the anchor, orNone. The value will have been normalized withnormalizers.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.xproperty getter.- Returns:
An
intor afloatrepresenting the x-coordinate of the anchor. The value will be normalized withnormalizers.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.yproperty getter.- Returns:
An
intor afloatrepresenting the x-coordinate of the anchor. The value will be normalized withnormalizers.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.colorproperty setter.- Parameters:
value – The Color to set for the anchor 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.
- BaseAnchor._set_name(value: str | None) None[source]¶
Set the native anchor’s name.
This is the environment implementation of the
BaseAnchor.nameproperty setter.- Parameters:
value – The name to set as a
strorNone. The value will have been normalized withnormalizers.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.xproperty setter.- Parameters:
value – The x-coordinate to set as an
intor afloat. The value will have been normalized withnormalizers.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.yproperty setter.- Parameters:
value – The y-coordinate to set as an
intor afloat. The value will have been normalized withnormalizers.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:
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.
- 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
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.
- 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
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.
- 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:
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.
- 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:
matrix – The Transformation Matrix to apply. The value will be normalized with
normalizers.normalizeTransformationMatrix.**kwargs – Additional keyword arguments.
Note
Subclasses may override this method.