tbapi.api.models.arrow_info

 1from __future__ import annotations
 2from typing import TYPE_CHECKING
 3from tbapi.common.decorators import tb_class
 4from tbapi.common.converters import to_python_datetime, to_net_datetime
 5from datetime import datetime
 6from Tickblaze.Scripts.Api.Models import ArrowInfo as _ArrowInfo
 7from typing import Any, overload
 8if TYPE_CHECKING:
 9    from tbapi.api.models.point import Point
10    from tbapi.api.interfaces.ipoint import IPoint
11
12@tb_class(_ArrowInfo)
13class ArrowInfo():
14    """Struct used to define an arrow"""
15
16    @overload
17    @staticmethod
18    def new(start: IPoint, end: IPoint, width: float) -> "ArrowInfo":
19        """Constructor overload with arguments: start, end, width"""
20        ...
21    @overload
22    @staticmethod
23    def new(length: float, angle: float, end: IPoint, width: float) -> "ArrowInfo":
24        """Constructor overload with arguments: length, angle, end, width"""
25        ...
26    @overload
27    @staticmethod
28    def new() -> "ArrowInfo":
29        """Constructor overload with arguments: """
30        ...
31    @staticmethod
32    def new(*args, **kwargs):
33        """Generic factory method for ArrowInfo. Use overloads for IDE type hints."""
34        return ArrowInfo(*args, **kwargs)
35
36    @property
37    def width(self) -> float:
38        """The width of the arrow in pixels"""
39        val = self._value.Width
40        return val
41    @property
42    def length(self) -> float:
43        """The length in pixels"""
44        val = self._value.Length
45        return val
46    @property
47    def angle(self) -> float:
48        """The angle in radians"""
49        val = self._value.Angle
50        return val
51    @property
52    def head_length_ratio(self) -> float:
53        """The fraction of the overall arrow length that the arrow head takes up"""
54        val = self._value.HeadLengthRatio
55        return val
56    @head_length_ratio.setter
57    def head_length_ratio(self, val: float):
58        tmp = self._value
59        tmp.HeadLengthRatio = val
60        self._value = tmp
61    @property
62    def tail_width_ratio(self) -> float:
63        """The ratio of the arrow head width taken up by the tail"""
64        val = self._value.TailWidthRatio
65        return val
66    @tail_width_ratio.setter
67    def tail_width_ratio(self, val: float):
68        tmp = self._value
69        tmp.TailWidthRatio = val
70        self._value = tmp
71    @property
72    def start(self) -> Point:
73        """The start point of the arrow"""
74        from tbapi.api.models.point import Point
75        val = self._value.Start
76        return Point(_existing=val)
77    @property
78    def end(self) -> Point:
79        """The end point of the arrow"""
80        from tbapi.api.models.point import Point
81        val = self._value.End
82        return Point(_existing=val)
83    @property
84    def drawing_points(self) -> list[Point]:
85        """The points that make up the arrow polygon"""
86        val = self._value.DrawingPoints
87        return val
@tb_class(_ArrowInfo)
class ArrowInfo:
19@tb_class(_ArrowInfo)
20class ArrowInfo():
21    """Struct used to define an arrow"""
22
23    @overload
24    @staticmethod
25    def new(start: IPoint, end: IPoint, width: float) -> "ArrowInfo":
26        """Constructor overload with arguments: start, end, width"""
27        ...
28    @overload
29    @staticmethod
30    def new(length: float, angle: float, end: IPoint, width: float) -> "ArrowInfo":
31        """Constructor overload with arguments: length, angle, end, width"""
32        ...
33    @overload
34    @staticmethod
35    def new() -> "ArrowInfo":
36        """Constructor overload with arguments: """
37        ...
38    @staticmethod
39    def new(*args, **kwargs):
40        """Generic factory method for ArrowInfo. Use overloads for IDE type hints."""
41        return ArrowInfo(*args, **kwargs)
42
43    @property
44    def width(self) -> float:
45        """The width of the arrow in pixels"""
46        val = self._value.Width
47        return val
48    @property
49    def length(self) -> float:
50        """The length in pixels"""
51        val = self._value.Length
52        return val
53    @property
54    def angle(self) -> float:
55        """The angle in radians"""
56        val = self._value.Angle
57        return val
58    @property
59    def head_length_ratio(self) -> float:
60        """The fraction of the overall arrow length that the arrow head takes up"""
61        val = self._value.HeadLengthRatio
62        return val
63    @head_length_ratio.setter
64    def head_length_ratio(self, val: float):
65        tmp = self._value
66        tmp.HeadLengthRatio = val
67        self._value = tmp
68    @property
69    def tail_width_ratio(self) -> float:
70        """The ratio of the arrow head width taken up by the tail"""
71        val = self._value.TailWidthRatio
72        return val
73    @tail_width_ratio.setter
74    def tail_width_ratio(self, val: float):
75        tmp = self._value
76        tmp.TailWidthRatio = val
77        self._value = tmp
78    @property
79    def start(self) -> Point:
80        """The start point of the arrow"""
81        from tbapi.api.models.point import Point
82        val = self._value.Start
83        return Point(_existing=val)
84    @property
85    def end(self) -> Point:
86        """The end point of the arrow"""
87        from tbapi.api.models.point import Point
88        val = self._value.End
89        return Point(_existing=val)
90    @property
91    def drawing_points(self) -> list[Point]:
92        """The points that make up the arrow polygon"""
93        val = self._value.DrawingPoints
94        return val

Struct used to define an arrow

ArrowInfo(*args, **kwargs)
162        def __init__(self, *args, **kwargs):
163            pass
@staticmethod
def new(*args, **kwargs):
38    @staticmethod
39    def new(*args, **kwargs):
40        """Generic factory method for ArrowInfo. Use overloads for IDE type hints."""
41        return ArrowInfo(*args, **kwargs)

Generic factory method for ArrowInfo. Use overloads for IDE type hints.

width: float
43    @property
44    def width(self) -> float:
45        """The width of the arrow in pixels"""
46        val = self._value.Width
47        return val

The width of the arrow in pixels

length: float
48    @property
49    def length(self) -> float:
50        """The length in pixels"""
51        val = self._value.Length
52        return val

The length in pixels

angle: float
53    @property
54    def angle(self) -> float:
55        """The angle in radians"""
56        val = self._value.Angle
57        return val

The angle in radians

head_length_ratio: float
58    @property
59    def head_length_ratio(self) -> float:
60        """The fraction of the overall arrow length that the arrow head takes up"""
61        val = self._value.HeadLengthRatio
62        return val

The fraction of the overall arrow length that the arrow head takes up

tail_width_ratio: float
68    @property
69    def tail_width_ratio(self) -> float:
70        """The ratio of the arrow head width taken up by the tail"""
71        val = self._value.TailWidthRatio
72        return val

The ratio of the arrow head width taken up by the tail

start: tbapi.api.models.point.Point
78    @property
79    def start(self) -> Point:
80        """The start point of the arrow"""
81        from tbapi.api.models.point import Point
82        val = self._value.Start
83        return Point(_existing=val)

The start point of the arrow

end: tbapi.api.models.point.Point
84    @property
85    def end(self) -> Point:
86        """The end point of the arrow"""
87        from tbapi.api.models.point import Point
88        val = self._value.End
89        return Point(_existing=val)

The end point of the arrow

drawing_points: list[tbapi.api.models.point.Point]
90    @property
91    def drawing_points(self) -> list[Point]:
92        """The points that make up the arrow polygon"""
93        val = self._value.DrawingPoints
94        return val

The points that make up the arrow polygon