Paragraph Element p
p(id, x, y, ax, ay, size, ml, mw, bl, c) {
Text
}
id
(optional): element IDx
(optional, default is0
):x
coordinate of texty
(optional, default is0
):y
coordinate of textax
(optional, default is0
): horizontal alignment of text, floating point number between[0, 1]
. When it is0
, it will be left aligned according to thex
coordinate; When it is1
it will be right aligned; When it is '0.5', text is centered.ay
(optional, default is0
): vertical alignment of text, the description is the same as abovesize
(optional, default1
): the size of the text.ml
(optional, defaultfalse
): whether the text will be rendered in multiple lines, only valid ifmw
is set.mw
(optional): maximum text width. In single-line mode, text beyond the range will be omitted; In multi-line mode, it will be automatically wrapped.bl
(optional, default istrue
): whether to align according to the baseline when aligning vertically.- c
(optional, default is
“white”`): text color Text
(required): text content
The position of
p
is not defined by a full rectangle, but you can still get the rectangular area ofp
by using itsid
attribute.