File: text.rst

package info (click to toggle)
ezdxf 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 104,528 kB
  • sloc: python: 182,341; makefile: 116; lisp: 20; ansic: 4
file content (140 lines) | stat: -rw-r--r-- 2,419 bytes parent folder | download | duplicates (2)
1
2
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
.. _Text Tools:

Text Tools
==========

.. module:: ezdxf.tools.text

MTextEditor
-----------

.. autoclass:: MTextEditor

    .. attribute:: text

        The MTEXT content as a simple string.

    .. automethod:: append

    .. automethod:: __iadd__

    .. automethod:: __str__

    .. automethod:: clear

    .. automethod:: font

    .. automethod:: height

    .. automethod:: scale_height

    .. automethod:: width_factor

    .. automethod:: char_tracking_factor

    .. automethod:: oblique

    .. automethod:: color

    .. automethod:: aci

    .. automethod:: rgb

    .. automethod:: underline

    .. automethod:: overline

    .. automethod:: strike_through

    .. automethod:: group

    .. automethod:: stack

    .. automethod:: paragraph

    .. automethod:: bullet_list

Constants stored in the :class:`MTextEditor` class:

=================== ==========
NEW_LINE            ``'\P'``
NEW_PARAGRAPH       ``'\P'``
NEW_COLUMN          ``'\N``
UNDERLINE_START     ``'\L'``
UNDERLINE_STOP      ``'\l'``
OVERSTRIKE_START    ``'\O'``
OVERSTRIKE_STOP     ``'\o'``
STRIKE_START        ``'\K'``
STRIKE_STOP         ``'\k'``
ALIGN_BOTTOM        ``'\A0;'``
ALIGN_MIDDLE        ``'\A1;'``
ALIGN_TOP           ``'\A2;'``
NBSP                ``'\~'``
TAB                 ``'^I'``
=================== ==========

.. autoclass:: ParagraphProperties(indent=0, left=0, right=0, align=DEFAULT, tab_stops=[])

    .. automethod:: tostring


.. class:: ezdxf.lldxf.const.MTextParagraphAlignment

    .. attribute:: DEFAULT

    .. attribute:: LEFT

    .. attribute:: RIGHT

    .. attribute:: CENTER

    .. attribute:: JUSTIFIED

    .. attribute:: DISTRIBUTED


Single Line Text
----------------

.. autoclass:: TextLine

    .. autoproperty:: width

    .. autoproperty:: height

    .. automethod:: stretch

    .. automethod:: font_measurements

    .. automethod:: baseline_vertices

    .. automethod:: corner_vertices

    .. automethod:: transform_2d

Functions
---------

.. autofunction:: caret_decode

.. autofunction:: estimate_mtext_content_extents

.. autofunction:: estimate_mtext_extents

.. autofunction:: fast_plain_mtext

.. autofunction:: is_text_vertical_stacked

.. autofunction:: is_upside_down_text_angle

.. autofunction:: leading

.. autofunction:: plain_mtext

.. autofunction:: plain_text

.. autofunction:: safe_string

.. autofunction:: text_wrap

.. autofunction:: upright_text_angle