python-lottie  0.7.0+dev66cafb9
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.objects.text.TextDocument Class Reference
Inheritance diagram for lottie.objects.text.TextDocument:
[legend]
Collaboration diagram for lottie.objects.text.TextDocument:
[legend]

Public Member Functions

def __init__ (self, text="", font_size=10, color=None, font_family="")
 
- Public Member Functions inherited from lottie.objects.base.LottieObject
def __init__ (self)
 
def to_dict (self)
 Serializes into a JSON object fit for the Lottie format. More...
 
def load (cls, lottiedict)
 Loads from a JSON object. More...
 
def find (self, search, propname="name")
 Recursively searches for child objects with a matching property. More...
 
def find_all (self, type, predicate=None, include_self=True)
 Find all child objects that match a predicate. More...
 
def clone (self)
 Returns a copy of the object. More...
 
def clone_into (self, other)
 
def __str__ (self)
 
- Public Member Functions inherited from lottie.objects.base.LottieObjectMeta
def __new__ (cls, name, bases, attr)
 

Public Attributes

 font_family
 
 fill_color
 Text color. More...
 
 stroke_color
 
 stroke_width
 
 stroke_over_fill
 Render stroke above the fill. More...
 
 line_height
 Line height when wrapping. More...
 
 justify
 Text alignment. More...
 
 wrap_size
 Size of the box containing the text. More...
 
 wrap_position
 Position of the box containing the text. More...
 
 text
 Text. More...
 
 font_size
 Font Size. More...
 
 text_caps
 Text caps. More...
 
 tracking
 Text Tracking. More...
 
 baseline_shift
 

Detailed Description

See also
http://docs.aenhancers.com/other/textdocument/

Note that for multi-line text, lines are separated by \r

Lottie JSON
Lottie name Type Description Attribute
f str   font_family
fc Color Text color.   fill_color
sc Color   stroke_color
sw float   stroke_width
of bool Render stroke above the fill.   stroke_over_fill
s float Font Size.   font_size
lh float Line height when wrapping.   line_height
sz NVector Size of the box containing the text.   wrap_size
ps NVector Position of the box containing the text.   wrap_position
t str Text.   text
j TextJustify Text alignment.   justify
ca TextCaps Text caps.   text_caps
tr float Text Tracking.   tracking
ls float   baseline_shift

Definition at line 137 of file text.py.

Constructor & Destructor Documentation

◆ __init__()

def lottie.objects.text.TextDocument.__init__ (   self,
  text = "",
  font_size = 10,
  color = None,
  font_family = "" 
)

Definition at line 163 of file text.py.

Member Data Documentation

◆ baseline_shift

lottie.objects.text.TextDocument.baseline_shift

Definition at line 190 of file text.py.

◆ fill_color

lottie.objects.text.TextDocument.fill_color

Text color.

Definition at line 167 of file text.py.

◆ font_family

lottie.objects.text.TextDocument.font_family

Definition at line 164 of file text.py.

◆ font_size

lottie.objects.text.TextDocument.font_size

Font Size.

Definition at line 185 of file text.py.

◆ justify

lottie.objects.text.TextDocument.justify

Text alignment.

Definition at line 177 of file text.py.

◆ line_height

lottie.objects.text.TextDocument.line_height

Line height when wrapping.

Definition at line 175 of file text.py.

◆ stroke_color

lottie.objects.text.TextDocument.stroke_color

Definition at line 169 of file text.py.

◆ stroke_over_fill

lottie.objects.text.TextDocument.stroke_over_fill

Render stroke above the fill.

Definition at line 172 of file text.py.

◆ stroke_width

lottie.objects.text.TextDocument.stroke_width

Definition at line 170 of file text.py.

◆ text

lottie.objects.text.TextDocument.text

Text.

Definition at line 183 of file text.py.

◆ text_caps

lottie.objects.text.TextDocument.text_caps

Text caps.

Definition at line 187 of file text.py.

◆ tracking

lottie.objects.text.TextDocument.tracking

Text Tracking.

Definition at line 189 of file text.py.

◆ wrap_position

lottie.objects.text.TextDocument.wrap_position

Position of the box containing the text.

Definition at line 181 of file text.py.

◆ wrap_size

lottie.objects.text.TextDocument.wrap_size

Size of the box containing the text.

Definition at line 179 of file text.py.


The documentation for this class was generated from the following file: