python-lottie  0.6.8+dev6bb61be
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 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 __str__ (self)
 
- Public Member Functions inherited from lottie.objects.base.LottieObjectMeta
def __new__ (cls, name, bases, attr)
 

Public Attributes

 font_family
 
 color
 Text color. More...
 
 line_height
 Line height when wrapping. More...
 
 justify
 Text alignment. More...
 
 wrap_size
 Size of the box containing the text. More...
 
 text
 Text. More...
 
 font_size
 Font Size. More...
 

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 NVector Text color.   color
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
t str Text.   text
j TextJustify Text alignment.   justify

Definition at line 86 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 103 of file text.py.

Member Data Documentation

◆ color

lottie.objects.text.TextDocument.color

Text color.

Definition at line 106 of file text.py.

◆ font_family

lottie.objects.text.TextDocument.font_family

Definition at line 104 of file text.py.

◆ font_size

lottie.objects.text.TextDocument.font_size

Font Size.

Definition at line 116 of file text.py.

◆ justify

lottie.objects.text.TextDocument.justify

Text alignment.

Definition at line 110 of file text.py.

◆ line_height

lottie.objects.text.TextDocument.line_height

Line height when wrapping.

Definition at line 108 of file text.py.

◆ text

lottie.objects.text.TextDocument.text

Text.

Definition at line 114 of file text.py.

◆ wrap_size

lottie.objects.text.TextDocument.wrap_size

Size of the box containing the text.

Definition at line 112 of file text.py.


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