BPoint

Must Override

May Override

BaseBPoint._get_anchor() tuple[int | float, int | float][source]

Get the bPoint’s anchor point.

This is the environment implementation of the BaseBPoint.anchor property getter.

Returns:

a Coordinate representing the anchor point of the bPoint. The value will be normalized with normalizers.normalizeCoordinateTuple.

Note

Subclasses may override this method.

BaseBPoint._get_bcpIn() tuple[int | float, int | float][source]

Get the bPoint’s incoming off-curve.

This is the environment implementation of the BaseBPoint.bcpIn property getter.

Returns:

A Coordinate representing the incoming off-curve of the bPoin. The value will be normalized with normalizers.normalizeCoordinateTuple.

Note

Subclasses may override this method.

BaseBPoint._get_bcpOut() tuple[int | float, int | float][source]

Get the bPoint’s outgoing off-curve.

This is the environment implementation of the BaseBPoint.bcpOut property getter.

Returns:

A Coordinate representing the outgoing off-curve of the bPoin. The value will be normalized with normalizers.normalizeCoordinateTuple.

Note

Subclasses may override this method.

BaseBPoint._get_index() int | None[source]

Get the index of the native bPoint.

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

Returns:

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

Note

Subclasses may override this method.

BaseBPoint._get_type() str[source]

Get the bPoint’s type.

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

Returns:

A str representing the type of the bPoint. The value will be normalized with normalizers.normalizeBPointType.

Raises:

FontPartsError – If the point’s type cannot be converted to a valid bPoint type.

Note

Subclasses may override this method.

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

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

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

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

BaseBPoint._set_anchor(value: list[int | float] | tuple[int | float, int | float]) None[source]

Set the bPoint’s anchor point.

This is the environment implementation of the BaseBPoint.anchor property setter.

Parameters:

value – The anchor point to set as a Coordinate. The value will have been normalized with normalizers.normalizeCoordinateTuple.

Note

Subclasses may override this method.

BaseBPoint._set_bcpIn(value: list[int | float] | tuple[int | float, int | float]) None[source]

Set the bPoint’s incoming off-curve.

This is the environment implementation of the BaseBPoint.bcpIn property setter.

Parameters:

value – The incoming off-curve to set as a Coordinate. The value will have been normalized with normalizers.normalizeCoordinateTuple.

Raises:

FontPartsError – When attempting to set the incoming off-curve for a the first point in an open contour.

Note

Subclasses may override this method.

BaseBPoint._set_bcpOut(value: list[int | float] | tuple[int | float, int | float]) None[source]

Set the bPoint’s outgoing off-curve.

This is the environment implementation of the BaseBPoint.bcpOut property setter.

Parameters:

value – The outgoing off-curve to set as a Coordinate. The value will have been normalized with normalizers.normalizeCoordinateTuple.

Raises:

FontPartsError – When attempting to set the outgoing off-curve for a the last point in an open contour.

Note

Subclasses may override this method.

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

Set the bPoint’s type.

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

Parameters:

value – The outgoing off-curve to set as a str. The value will have been normalized with normalizers.normalizeBPointType.

Note

Subclasses may override this method.

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

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

Transform the native bPoint.

This is the environment implementation of BaseBPoint.transformBy.

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

  • **kwargs – Additional keyword arguments.

Note

Subclasses may override this method.

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