Point

Must Override

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

BasePoint._get_name() str | None[source]

Get the name of the native point.

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

Returns:

A str representing the point’s name or None. The value will be normalized with normalizers.normalizePointName.

Raises:

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

Important

Subclasses must override this method.

BasePoint._get_smooth() bool[source]

Get the native point’s smooth state.

This is the environment implementation of the BasePoint.smooth property getter.

Returns:

A bool indicating the point’s smooth state. The value will be normalized with normalizers.normalizeBoolean.

Raises:

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

Important

Subclasses must override this method.

BasePoint._get_type() str[source]

Get the native point’s type.

This is the environment implementation of the BasePoint.type property getter.

Returns:

A str representing the type of the point. The value will be normalized with normalizers.normalizePointType.

Raises:

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

Important

Subclasses must override this method.

BasePoint._get_x() int | float[source]

Get the x coordinate of the native point.

Description

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

Returns:

An int or a float representing the point’s x coordinate. 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.

BasePoint._get_y() int | float[source]

Get the y coordinate of the native point.

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

Returns:

An int or a float representing the point’s y coordinate. 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.

BasePoint._set_name(value: str) None[source]

Set the name of the native point.

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

Parameters:

value – The point name as a str. The value will have been normalized with normalizers.normalizePointName.

Raises:

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

Important

Subclasses must override this method.

BasePoint._set_smooth(value: bool) None[source]

Set the native point’s smooth state.

This is the environment implementation of the BasePoint.smooth property setter.

Parameters:

value – The point’s smooth state as a bool. The value will have been normalized with normalizers.normalizeBoolean.

Raises:

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

Important

Subclasses must override this method.

BasePoint._set_type(value: str) None[source]

Set the native point’s type.

Description

This is the environment implementation of the BasePoint.type property setter.

Parameters:

value – The point type definition as a str. The value will have been normalized with normalizers.normalizePointType.

Raises:

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

Important

Subclasses must override this method.

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

Set the x coordinate of the native point.

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

Parameters:

value – The point’s x coodinate to set as an int or 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.

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

Set the y coordinate of the native point.

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

Parameters:

value – The point’s y coordinate as an int or 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

BasePoint._get_index() int | None[source]

Get the index of the native point.

This is the environment implementation of the BasePoint.index property getter.

Returns:

An int representing the point’s index within an ordered list of the parent contour’s points, or None if the point does not belong to a contour. The value will be normalized with normalizers.normalizeIndex.

Note

Subclasses may override this method.

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

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

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

BasePoint._round(**kwargs: Any) None[source]

Round the native point’s coordinates.

This is the environment implementation of BasePoint.round.

Parameters:

**kwargs – Additional keyword arguments.

Note

Subclasses may override this method.

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

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

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

Transform the native point.

This is the environment implementation of BasePoint.transformBy.

Parameters:
  • matrix – The transformation to apply as a Transformation Matrix.

  • **kwargs – Additional keyword arguments.

Note

Subclasses may override this method.

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