Skip to content

FL.Point

Point

Point - base class to represent point

Integer or float values are accepted as coordinates

CONSTRUCTOR: Point() - generic constructor, creates a Point with zero coordinates Point(Point) - copy constructor Point(x, y) - creates a Point and assigns coordinates. x and y may be integer or float

ATTRIBUTES: parent (read-only) - Point's parent object x (integer or float) - horizontal position of the point y (integer or float) - vertical position of the point

OPERATIONS: == - compares two points, both coordinates must be equal add - Point must be second operand, both coordinates are added subtract - Point must be second operand, both coordinates are added multiply - second operand may be Point, float or Matrix. If second operand is Point, then result of scalar product is returned

METHODS Assign(Point p) | (x, y) - assigns new values to a Point Shift(Point p) | (x, y) - shifts Point on a position defined by p or x and y values Add(Point p) - same as Shift(Point p) Sub(Point p) - subtracts p coordinates from the current Point Mul(float s) - mutiplies Point's position to s value Transform(Matrix m) - applies Matrix transformation to the Point (see Matrix().doc)

Native bases: object

Captured native MRO: Point, object

Native new allocation evidence (not an init overload): (args, *kwargs) Create and return a new object. See help(type) for accurate signature.

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
Add function (self, p: Any) -> Any
Assign function (self, *args: Any, **kwargs: Any) -> Any Assign(Point p) | (x, y) - assigns new values to a Point
Mul function (self, s: float) -> Any Mutiplies Point's position to s value
Shift function (self, *args: Any, **kwargs: Any) -> Any Shift(Point p) | (x, y) - shifts Point on a position defined by p or x and y values
Sub function (self, p: Any) -> Any Subtracts p coordinates from the current Point
Transform function (self, m: Any) -> Any
__init__ function (self, /, *args: Any, **kwargs: Any) -> None Initialize self. (shared captured text)
x attribute Any (shared captured text)
y attribute Any (shared captured text)