dummy_point
Module with helper class for representing a dummy point.
- class DummyPointConst
Bases:
object
Class container for dummy point constants.
- POINT_COORD_BYTE_LEN: int = 32
- class DummyPoint(point_obj: Any)
Bases:
IPoint
,ABC
Dummy point class.
- classmethod FromBytes(point_bytes: bytes) IPoint
Construct class from point bytes.
- Parameters:
point_bytes (bytes) – Point bytes
- Returns:
IPoint object
- Return type:
- classmethod FromCoordinates(x: int, y: int) IPoint
Construct class from point coordinates.
- Parameters:
x (int) – X coordinate of the point
y (int) – Y coordinate of the point
- Returns:
IPoint object
- Return type:
- m_x: int
- m_y: int
- static CoordinateLength() int
Get the coordinate length.
- Returns:
Coordinate key length
- Return type:
int
- UnderlyingObject() Any
Get the underlying object.
- Returns:
Underlying object
- Return type:
Any
- X() int
Get point X coordinate.
- Returns:
Point X coordinate
- Return type:
int
- Y() int
Get point Y coordinate.
- Returns:
Point Y coordinate
- Return type:
int
- Raw() DataBytes
Return the point raw bytes.
- Returns:
DataBytes object
- Return type:
DataBytes object
- RawEncoded() DataBytes
Return the encoded point raw bytes.
- Returns:
DataBytes object
- Return type:
DataBytes object
- RawDecoded() DataBytes
Return the decoded point raw bytes.
- Returns:
DataBytes object
- Return type:
DataBytes object
- __add__(point: IPoint) IPoint
Add point to another point.
- Parameters:
point (IPoint object) – IPoint object
- Returns:
IPoint object
- Return type:
IPoint object
- __radd__(point: IPoint) IPoint
Add point to another point.
- Parameters:
point (IPoint object) – IPoint object
- Returns:
IPoint object
- Return type:
IPoint object