Skip to content

Text Object Options

text_object_options

Source code in src/cadwork/text_object_options.pyi
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
class text_object_options:

    def set_font_name(self, font_name: str) -> None:
        """set font name

        Parameters:
            font_name: font_name

        Returns:
            None
        """

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

        Returns:
            str
        """

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

        Parameters:
            text: text

        Returns:
            None
        """

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

        Returns:
            str
        """

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

        Parameters:
            value: value

        Returns:
            None
        """

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

        Returns:
            bool
        """

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

        Parameters:
            value: value

        Returns:
            None
        """

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

        Returns:
            bool
        """

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

        Parameters:
            height: height

        Returns:
            None
        """

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

        Returns:
            float
        """

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

        Parameters:
            element_type: element_type

        Returns:
            None
        """

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

        Returns:
            text_element_type
        """

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

        Parameters:
            thickness: thickness

        Returns:
            None
        """

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

        Returns:
            float
        """

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

        Parameters:
            color: color

        Returns:
            None
        """

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

        Returns:
            int
        """

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

        Parameters:
            value: value

        Returns:
            None
        """

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

        Returns:
            bool
        """

get_bold()

get bold

Returns:

Type Description
bool

bool

Source code in src/cadwork/text_object_options.pyi
49
50
51
52
53
54
def get_bold(self) -> bool:
    """get bold

    Returns:
        bool
    """

get_color()

get color

Returns:

Type Description
int

int

Source code in src/cadwork/text_object_options.pyi
134
135
136
137
138
139
def get_color(self) -> int:
    """get color

    Returns:
        int
    """

get_element_type()

get element type

Returns:

Type Description
text_element_type

text_element_type

Source code in src/cadwork/text_object_options.pyi
100
101
102
103
104
105
def get_element_type(self) -> text_element_type:
    """get element type

    Returns:
        text_element_type
    """

get_font_name()

get font name

Returns:

Type Description
str

str

Source code in src/cadwork/text_object_options.pyi
15
16
17
18
19
20
def get_font_name(self) -> str:
    """get font name

    Returns:
        str
    """

get_height()

get height

Returns:

Type Description
float

float

Source code in src/cadwork/text_object_options.pyi
83
84
85
86
87
88
def get_height(self) -> float:
    """get height

    Returns:
        float
    """

get_height_relative()

get height relative

Returns:

Type Description
bool

bool

Source code in src/cadwork/text_object_options.pyi
151
152
153
154
155
156
def get_height_relative(self) -> bool:
    """get height relative

    Returns:
        bool
    """

get_italic()

get italic

Returns:

Type Description
bool

bool

Source code in src/cadwork/text_object_options.pyi
66
67
68
69
70
71
def get_italic(self) -> bool:
    """get italic

    Returns:
        bool
    """

get_text()

get text

Returns:

Type Description
str

str

Source code in src/cadwork/text_object_options.pyi
32
33
34
35
36
37
def get_text(self) -> str:
    """get text

    Returns:
        str
    """

get_thickness()

get thickness

Returns:

Type Description
float

float

Source code in src/cadwork/text_object_options.pyi
117
118
119
120
121
122
def get_thickness(self) -> float:
    """get thickness

    Returns:
        float
    """

set_bold(value)

set bold

Parameters:

Name Type Description Default
value bool

value

required

Returns:

Type Description
None

None

Source code in src/cadwork/text_object_options.pyi
39
40
41
42
43
44
45
46
47
def set_bold(self, value: bool) -> None:
    """set bold

    Parameters:
        value: value

    Returns:
        None
    """

set_color(color)

set color

Parameters:

Name Type Description Default
color int

color

required

Returns:

Type Description
None

None

Source code in src/cadwork/text_object_options.pyi
124
125
126
127
128
129
130
131
132
def set_color(self, color: int) -> None:
    """set color

    Parameters:
        color: color

    Returns:
        None
    """

set_element_type(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 src/cadwork/text_object_options.pyi
90
91
92
93
94
95
96
97
98
def set_element_type(self, element_type: text_element_type) -> None:
    """set element type

    Parameters:
        element_type: element_type

    Returns:
        None
    """

set_font_name(font_name)

set font name

Parameters:

Name Type Description Default
font_name str

font_name

required

Returns:

Type Description
None

None

Source code in src/cadwork/text_object_options.pyi
 5
 6
 7
 8
 9
10
11
12
13
def set_font_name(self, font_name: str) -> None:
    """set font name

    Parameters:
        font_name: font_name

    Returns:
        None
    """

set_height(height)

set height

Parameters:

Name Type Description Default
height float

height

required

Returns:

Type Description
None

None

Source code in src/cadwork/text_object_options.pyi
73
74
75
76
77
78
79
80
81
def set_height(self, height: float) -> None:
    """set height

    Parameters:
        height: height

    Returns:
        None
    """

set_height_relative(value)

set height relative

Parameters:

Name Type Description Default
value bool

value

required

Returns:

Type Description
None

None

Source code in src/cadwork/text_object_options.pyi
141
142
143
144
145
146
147
148
149
def set_height_relative(self, value: bool) -> None:
    """set height relative

    Parameters:
        value: value

    Returns:
        None
    """

set_italic(value)

set italic

Parameters:

Name Type Description Default
value bool

value

required

Returns:

Type Description
None

None

Source code in src/cadwork/text_object_options.pyi
56
57
58
59
60
61
62
63
64
def set_italic(self, value: bool) -> None:
    """set italic

    Parameters:
        value: value

    Returns:
        None
    """

set_text(text)

set text

Parameters:

Name Type Description Default
text str

text

required

Returns:

Type Description
None

None

Source code in src/cadwork/text_object_options.pyi
22
23
24
25
26
27
28
29
30
def set_text(self, text: str) -> None:
    """set text

    Parameters:
        text: text

    Returns:
        None
    """

set_thickness(thickness)

set thickness

Parameters:

Name Type Description Default
thickness float

thickness

required

Returns:

Type Description
None

None

Source code in src/cadwork/text_object_options.pyi
107
108
109
110
111
112
113
114
115
def set_thickness(self, thickness: float) -> None:
    """set thickness

    Parameters:
        thickness: thickness

    Returns:
        None
    """

text_element_type

Bases: IntEnum

text element type

Examples:

>>> cadwork.text_element_type.line
line
Source code in src/cadwork/text_element_type.pyi
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
@unique
class text_element_type(IntEnum):
    """text element type

    Examples:
        >>> cadwork.text_element_type.line
        line
    """
    line = 0
    """"""
    surface = 1
    """"""
    volume = 2
    """"""
    raster = 3
    """"""

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

line = 0 class-attribute instance-attribute

raster = 3 class-attribute instance-attribute

surface = 1 class-attribute instance-attribute

volume = 2 class-attribute instance-attribute