wolfhece.assets.curve.controller ================================ .. py:module:: wolfhece.assets.curve.controller .. autoapi-nested-parse:: Persistent controller for editable curve plot assets. Module Contents --------------- .. py:class:: CurveZonesController(curves: Sequence[Sequence[tuple[float, float]]], *, id: str = 'curve_plot', labels: Sequence[str] | None = None, x_bounds: tuple[float, float] | None = None, y_bounds: tuple[float, float] | None = None, clamp_projected_points: bool = True, sort_by_x: bool = True, colors: Sequence[tuple[int, int, int] | tuple[int, int, int, int]] | None = None, curve_styles: Sequence[dict] | None = None, canvas_origin: tuple[float, float] = (0.0, 0.0), canvas_size: tuple[float, float] = (100.0, 100.0), area_fraction: tuple[float, float, float, float] = (0.1, 0.1, 0.8, 0.3), line_width: float = 1.5, line_alpha: int = 255, show_area_frame: bool = True, frame_color: tuple[int, int, int] = (40, 40, 40), show_axes: bool = False, axes_color: tuple[int, int, int] = (25, 25, 25), axes_line_width: float = 1.2, show_grid: bool = False, grid_color: tuple[int, int, int] = (120, 120, 120), grid_line_width: float = 0.8, grid_dx: float = 1.0, grid_dy: float = 1.0, show_x_ticks: bool = False, show_y_ticks: bool = False, show_x_tick_labels: bool = False, show_y_tick_labels: bool = False, x_tick_position: str = 'inside', y_tick_position: str = 'inside', x_tick_format: str = '', y_tick_format: str = '', legend_visible: bool = False, legend_text_color: tuple[int, int, int] = (0, 0, 0), mapviewer=None, editor: wolfhece.assets.curve.editor.CurveZonesEditor | None = None) Persistent controller for curve plots in a canvas fraction. .. py:attribute:: id :value: '' .. py:attribute:: curves .. py:attribute:: labels .. py:attribute:: x_bounds :value: None .. py:attribute:: y_bounds :value: None .. py:attribute:: clamp_projected_points :value: True .. py:attribute:: sort_by_x :value: True .. py:attribute:: colors .. py:attribute:: canvas_x .. py:attribute:: canvas_y .. py:attribute:: canvas_width .. py:attribute:: canvas_height .. py:attribute:: area_fraction .. py:attribute:: line_width .. py:attribute:: line_alpha .. py:attribute:: curve_styles :value: [] .. py:attribute:: show_area_frame :value: True .. py:attribute:: frame_color :value: (40, 40, 40) .. py:attribute:: show_axes :value: False .. py:attribute:: axes_color :value: (25, 25, 25) .. py:attribute:: axes_line_width .. py:attribute:: show_grid :value: False .. py:attribute:: grid_color :value: (120, 120, 120) .. py:attribute:: grid_line_width .. py:attribute:: grid_dx .. py:attribute:: grid_dy .. py:attribute:: show_x_ticks :value: False .. py:attribute:: show_y_ticks :value: False .. py:attribute:: show_x_tick_labels :value: False .. py:attribute:: show_y_tick_labels :value: False .. py:attribute:: x_tick_position :value: '' .. py:attribute:: y_tick_position :value: '' .. py:attribute:: x_tick_format :value: '' .. py:attribute:: y_tick_format :value: '' .. py:attribute:: legend_visible :value: False .. py:attribute:: legend_text_color .. py:attribute:: mapviewer :value: None .. py:attribute:: editor :value: None .. py:attribute:: zones :type: wolfhece.PyVertexvectors.Zones | None :value: None .. py:method:: _normalize_curve_styles(styles: Sequence[dict] | None) -> list[dict] .. py:method:: _build_asset() -> wolfhece.assets.curve.zones_asset.CurveZonesAsset .. py:method:: update_curves(curves: Sequence[Sequence[tuple[float, float]]] | None = None, labels: Sequence[str] | None = None, colors: Sequence[tuple[int, int, int] | tuple[int, int, int, int]] | None = None, curve_styles: Sequence[dict] | None = None, rebuild: bool = True) -> None .. py:method:: update_geometry(*, x_bounds: tuple[float, float] | None = None, y_bounds: tuple[float, float] | None = None, canvas_origin: tuple[float, float] | None = None, canvas_size: tuple[float, float] | None = None, area_fraction: tuple[float, float, float, float] | None = None, rebuild: bool = True) -> None .. py:method:: get_transform_bounds() -> tuple[float, float, float, float] Return editable asset bounds as ``(xmin, ymin, xmax, ymax)``. For curve assets, this corresponds to the canvas rectangle in world coordinates. .. py:method:: apply_transform_bounds(bounds: tuple[float, float, float, float], *, rebuild: bool = True) -> None Apply rectangle bounds produced by map drag/resize handles. .. py:method:: update_style(*, clamp_projected_points: bool | None = None, sort_by_x: bool | None = None, line_width: float | None = None, line_alpha: int | None = None, show_area_frame: bool | None = None, frame_color: tuple[int, int, int] | None = None, show_axes: bool | None = None, axes_color: tuple[int, int, int] | None = None, axes_line_width: float | None = None, show_grid: bool | None = None, grid_color: tuple[int, int, int] | None = None, grid_line_width: float | None = None, grid_dx: float | None = None, grid_dy: float | None = None, show_x_ticks: bool | None = None, show_y_ticks: bool | None = None, show_x_tick_labels: bool | None = None, show_y_tick_labels: bool | None = None, x_tick_position: str | None = None, y_tick_position: str | None = None, x_tick_format: str | None = None, y_tick_format: str | None = None, legend_visible: bool | None = None, legend_text_color: tuple[int, int, int] | None = None, rebuild: bool = True) -> None .. py:method:: rebuild(ToCheck: bool = True) -> wolfhece.PyVertexvectors.Zones .. py:method:: _get_mapviewer_objects() -> list .. py:method:: _get_vector_draw_type() .. py:method:: _get_vector_by_id(obj_id: str) .. py:method:: _find_bound_zones_in_mapviewer() -> wolfhece.PyVertexvectors.Zones | None .. py:method:: _resolve_unique_id(preferred: str, exclude_obj=None) -> str .. py:method:: attach_to_mapviewer(mapviewer, id: str | None = None, ToCheck: bool = True) -> wolfhece.PyVertexvectors.Zones .. py:method:: show_editor(parent=None) .. py:method:: to_dict() -> dict .. py:method:: from_dict(data: dict) -> CurveZonesController :staticmethod: .. py:method:: save_json(path: str | pathlib.Path) -> None .. py:method:: load_json(path: str | pathlib.Path) -> CurveZonesController :staticmethod: