FormatUtil
Script for FormatUtil
FormatUtil
Canonical path: Utils.FormatUtil.FormatUtil
Implementation of the format utilities
get_layer_pen_stroke_color
staticmethod
get_layer_pen_stroke_color(layer: int | str) -> tuple[bool, int, int, int]
get the pen, stroke and color from the layer
Parameters:
-
layer
(int | str
) –number of the layer
Returns:
-
tuple[bool, int, int, int]
–tuple(pen, stroke, color)
init_by_global_properties
staticmethod
init_by_global_properties(build_ele: BuildingElement)
initialize the values by global properties
Parameters:
-
build_ele
(BuildingElement
) –building element with the parameter properties
init_list_by_global_properties
staticmethod
init_list_by_global_properties(build_ele: BuildingElement)
initialize the values by global properties
Parameters:
-
build_ele
(BuildingElement
) –building element with the parameter properties
update_build_ele_list_values
staticmethod
update_build_ele_list_values(build_ele: BuildingElement)
Update the list values inside the building element
return Property is updated: True/False
Parameters:
-
build_ele
(BuildingElement
) –building element with the parameter properties
update_build_ele_single_values
staticmethod
update_build_ele_single_values(build_ele: BuildingElement)
Update the single values inside the building element
return Property is updated: True/False
Parameters:
-
build_ele
(BuildingElement
) –building element with the parameter properties
update_by_layer
staticmethod
update_by_layer(
color: int,
color_by_layer: bool,
pen: int,
pen_by_layer: bool,
stroke: int,
stroke_by_layer: bool,
layer: int,
) -> tuple[int, int, int]
Update the common properties by layer
Parameters:
-
color
(int
) –color
-
color_by_layer
(bool
) –color by layer state
-
pen
(int
) –pen
-
pen_by_layer
(bool
) –pen by layer state
-
stroke
(int
) –stroke
-
stroke_by_layer
(bool
) –stroke by layer state
-
layer
(int
) –layer
Returns:
-
tuple[int, int, int]
–color, pen, stroke