BarsDimLinePlacement
implementation of the BarsDimLinePlacement class
BarsDimLinePlacement
Canonical path: Utils.Reinforcement.BarsDimLinePlacement.BarsDimLinePlacement
implementation of the BarsDimLinePlacement class
__init__
__init__(bars_rep_elements: list[BarsRepresentation])
get_dim_line_position
get_dim_line_position(
bars_representation: BarsRepresentation,
bars_rep_util: BarsRepresentationUtil,
offset_from_placement: float,
dim_line_distance: float,
dim_line_angle_from: float,
dim_line_angle_to: float,
text_dist: float,
) -> tuple[bool, bool, float, TextAlignment, Line2D]
get the dimension line position
Parameters:
-
bars_representation
(BarsRepresentation
) –representation element
-
bars_rep_util
(BarsRepresentationUtil
) –bars representation utility
-
offset_from_placement
(float
) –offset from the placement
-
dim_line_distance
(float
) –dimension line distance
-
dim_line_angle_from
(float
) –dimension line angle from
-
dim_line_angle_to
(float
) –dimension line angle to
-
text_dist
(float
) –text distance from the dimension line
Returns:
-
tuple[bool, bool, float, TextAlignment, Line2D]
–location at start, distance from the placement, text alignment, handle point
get_label_offset
get_label_offset(
bars_rep: BarsRepresentation,
dim_line: Line2D,
bars_ref_line_util: BarsRepresentationLineUtil,
text_dist: float,
) -> Vector2D
get the label offset in case of intersection with the center bar
Parameters:
-
bars_rep
(BarsRepresentation
) –bars representation
-
dim_line
(Line2D
) –dimension line
-
bars_ref_line_util
(BarsRepresentationLineUtil
) –bars representation line utility
-
text_dist
(float
) –text distance from the dimension line
Returns:
-
Vector2D
–offset
select_dim_line_bars_rep
set_dim_line_position
Placeholder