Skip to content

Test Object Options

cadwork.text_object_options

text_object_options

Source code in cadwork/text_object_options.py
class text_object_options:
    def set_font_name(self, font_name: str) -> None:
        """set font name
        Args:
            font_name ( str): font_name

        Returns:
            None
        """

    def get_font_name(self) -> str:
        """get font name
        Args:

        Returns:

        """

    def set_text(self, text: str) -> None:
        """set text
        Args:
            text ( str): text

        Returns:
            None
        """

    def get_text(self) -> str:
        """get text
        Args:

        Returns:
            str
        """

    def set_bold(self, value: bool) -> None:
        """set bold
        Args:
            value ( bool): value

        Returns:
            None
        """

    def get_bold(self) -> bool:
        """get bold
        Args:

        Returns:
            bool
        """

    def set_italic(self, value: bool) -> None:
        """set italic
        Args:
            value ( bool): value

        Returns:
            None
        """

    def get_italic(self) -> bool:
        """get italic
        Args:

        Returns:
            bool
        """

    def set_height(self, height: float) -> None:
        """set height
        Args:
            height ( float): height

        Returns:
            None
        """

    def get_height(self) -> float:
        """get height
        Args:

        Returns:
            float
        """

    def set_element_type(self, element_type: text_element_type) -> None:
        """set element type
        Args:
            element_type ( text_element_type): element_type

        Returns:
            None
        """

    def get_element_type(self) -> text_element_type:
        """get element type
        Args:

        Returns:
            text_element_type
        """

    def set_thickness(self, thickness: float) -> None:
        """set thickness
        Args:
            thickness ( float): thickness

        Returns:
            None
        """

    def get_thickness(self) -> float:
        """get thickness
        Args:

        Returns:
            float
        """

    def set_color(self, color: int) -> None:
        """set color
        Args:
            color ( int): color

        Returns:
            None
        """

    def get_color(self) -> int:
        """get color
        Args:

        Returns:
            int
        """

    def set_height_relative(self, value: bool) -> None:
        """set height relative
        Args:
            value ( bool): value

        Returns:
            None
        """

    def get_height_relative(self) -> bool:
        """get height relative
        Args:

        Returns:
            bool
        """

get_bold(self)

get bold

Returns:

Type Description
bool

bool

Source code in cadwork/text_object_options.py
def get_bold(self) -> bool:
    """get bold
    Args:

    Returns:
        bool
    """

get_color(self)

get color

Returns:

Type Description
int

int

Source code in cadwork/text_object_options.py
def get_color(self) -> int:
    """get color
    Args:

    Returns:
        int
    """

get_element_type(self)

get element type

Returns:

Type Description
text_element_type

text_element_type

Source code in cadwork/text_object_options.py
def get_element_type(self) -> text_element_type:
    """get element type
    Args:

    Returns:
        text_element_type
    """

get_font_name(self)

get font name

Source code in cadwork/text_object_options.py
def get_font_name(self) -> str:
    """get font name
    Args:

    Returns:

    """

get_height(self)

get height

Returns:

Type Description
float

float

Source code in cadwork/text_object_options.py
def get_height(self) -> float:
    """get height
    Args:

    Returns:
        float
    """

get_height_relative(self)

get height relative

Returns:

Type Description
bool

bool

Source code in cadwork/text_object_options.py
def get_height_relative(self) -> bool:
    """get height relative
    Args:

    Returns:
        bool
    """

get_italic(self)

get italic

Returns:

Type Description
bool

bool

Source code in cadwork/text_object_options.py
def get_italic(self) -> bool:
    """get italic
    Args:

    Returns:
        bool
    """

get_text(self)

get text

Returns:

Type Description
str

str

Source code in cadwork/text_object_options.py
def get_text(self) -> str:
    """get text
    Args:

    Returns:
        str
    """

get_thickness(self)

get thickness

Returns:

Type Description
float

float

Source code in cadwork/text_object_options.py
def get_thickness(self) -> float:
    """get thickness
    Args:

    Returns:
        float
    """

set_bold(self, value)

set bold

Parameters:

Name Type Description Default
value bool

value

required

Returns:

Type Description
None

None

Source code in cadwork/text_object_options.py
def set_bold(self, value: bool) -> None:
    """set bold
    Args:
        value ( bool): value

    Returns:
        None
    """

set_color(self, color)

set color

Parameters:

Name Type Description Default
color int

color

required

Returns:

Type Description
None

None

Source code in cadwork/text_object_options.py
def set_color(self, color: int) -> None:
    """set color
    Args:
        color ( int): color

    Returns:
        None
    """

set_element_type(self, element_type)

set element type

Parameters:

Name Type Description Default
element_type text_element_type

element_type

required

Returns:

Type Description
None

None

Source code in cadwork/text_object_options.py
def set_element_type(self, element_type: text_element_type) -> None:
    """set element type
    Args:
        element_type ( text_element_type): element_type

    Returns:
        None
    """

set_font_name(self, font_name)

set font name

Parameters:

Name Type Description Default
font_name str

font_name

required

Returns:

Type Description
None

None

Source code in cadwork/text_object_options.py
def set_font_name(self, font_name: str) -> None:
    """set font name
    Args:
        font_name ( str): font_name

    Returns:
        None
    """

set_height(self, height)

set height

Parameters:

Name Type Description Default
height float

height

required

Returns:

Type Description
None

None

Source code in cadwork/text_object_options.py
def set_height(self, height: float) -> None:
    """set height
    Args:
        height ( float): height

    Returns:
        None
    """

set_height_relative(self, value)

set height relative

Parameters:

Name Type Description Default
value bool

value

required

Returns:

Type Description
None

None

Source code in cadwork/text_object_options.py
def set_height_relative(self, value: bool) -> None:
    """set height relative
    Args:
        value ( bool): value

    Returns:
        None
    """

set_italic(self, value)

set italic

Parameters:

Name Type Description Default
value bool

value

required

Returns:

Type Description
None

None

Source code in cadwork/text_object_options.py
def set_italic(self, value: bool) -> None:
    """set italic
    Args:
        value ( bool): value

    Returns:
        None
    """

set_text(self, text)

set text

Parameters:

Name Type Description Default
text str

text

required

Returns:

Type Description
None

None

Source code in cadwork/text_object_options.py
def set_text(self, text: str) -> None:
    """set text
    Args:
        text ( str): text

    Returns:
        None
    """

set_thickness(self, thickness)

set thickness

Parameters:

Name Type Description Default
thickness float

thickness

required

Returns:

Type Description
None

None

Source code in cadwork/text_object_options.py
def set_thickness(self, thickness: float) -> None:
    """set thickness
    Args:
        thickness ( float): thickness

    Returns:
        None
    """

cadwork.text_element_type

text_element_type (IntEnum)

text element type

Examples:

>>> cadwork.text_element_type.line
line
Source code in cadwork/text_element_type.py
@unique
class text_element_type(IntEnum):
    """text element type

    Examples:
        >>> cadwork.text_element_type.line
        line

    Args:
        line = 0
        surface = 1
        volume = 2

    """
    line = 0
    surface = 1
    volume = 2

    def __int__(self) -> int:
        return self.value

rendering: show_root_heading: false show_source: true