Point¶
-
class
visualife.diagrams.Point(x, y)¶ Bases:
objectA simple data structure to hold X,Y coordinates on a screen.
Diagram nodes, such as RectNode or DotNode are derived from Point to define their location. The
Pointclass defines also basic arithmetic operations, user can therefore easily compute coordinates of a new node based on existing nodes (e.g. coordinates of a point that is exactly in the middle of two nodes)Creates a point from the given coordinates
Parameters: - x – (
number) x viewport coordinate - y – (
number) y viewport coordinate
Attributes Summary
xyMethods Summary
distance_to(another_point)Calculated distance from this Pointto another oneAttributes Documentation
-
x¶
-
y¶
Methods Documentation
- x – (