Skip to content

TextElementUtil

implementation of the TextElementUtil class

  • create text properties
  • set text properties
  • add text element to the model element list

TextElementUtil

Canonical path: Utils.General.TextElementUtil.TextElementUtil

implementation of the TextElementUtil class

__init__

__init__()

initialize

add_text

add_text(
    model_ele_list: ModelEleList, x_ref_pnt: float, y_ref_pnt: float, text: str
)

add a text element to the model element list

Parameters:

  • model_ele_list (ModelEleList) –

    model element list

  • x_ref_pnt (float) –

    x coordinate reference point

  • y_ref_pnt (float) –

    y coordinate reference point

  • text (str) –

    text

create_text_properties

create_text_properties(
    font_name: str | int, font_size: float, alignment: TextAlignment
)

create text properties

Parameters:

  • font_name (str | int) –

    font name

  • font_size (float) –

    font size

  • alignment (TextAlignment) –

    alignment of the text

set_properties

set_properties(text_prop: TextProperties)

set the text properties

Parameters:

Placeholder