1 from .base
import LottieObject, LottieProp, LottieEnum
2 from .properties
import Value, MultiDimensional, ColorValue, Color
3 from ..nvector
import NVector
4 from .helpers
import Transform
5 from .shapes
import ShapeElement
83 LottieProp(
"alignment",
"a", MultiDimensional),
97 JustifyWithLastLineLeft = 3
98 JustifyWithLastLineRight = 4
99 JustifyWithLastLineCenter = 5
100 JustifyWithLastLineFull = 6
113 @see http://docs.aenhancers.com/other/textdocument/
115 Note that for multi-line text, lines are separated by \\r
125 LottieProp(
"text_caps",
"ca", TextCaps,
False),
129 def __init__(self, text="", font_size=10, color=None, font_family=""):
166 LottieProp(
"keyframes",
"k", TextDataKeyframe,
True),
182 LottieProp(
"properties",
"a", TextAnimatorDataProperty,
True),
184 LottieProp(
"more_options",
"m", TextMoreOptions,
False),
218 LottieProp(
"origin",
"origin", FontPathOrigin),
222 def __init__(self, font_family="sans", font_style="Regular", name=None):
226 self.
namename = name
or "%s-%s" % (font_family, font_style)
252 LottieProp(
"shapes",
"shapes", ShapeElement,
True),
262 Defines character shapes to avoid loading system fonts
266 LottieProp(
"font_family",
"fFamily", str,
False),
267 LottieProp(
"font_size",
"size", float,
False),
268 LottieProp(
"font_style",
"style", str,
False),
270 LottieProp(
"data",
"data", CharacterData,
False),
289 return self.
datadata.shapes
Base class for enum-like types in the Lottie JSON structure.
Base class for mapping Python classes into Lottie JSON objects.
Lottie <-> Python property mapper.
An animatable property that holds a NVector.
An animatable property that holds a float.
Defines character shapes to avoid loading system fonts.
character
Character Value.
font_size
Character Font Size.
font_style
Character Font Style.
font_family
Character Font Family.
def __init__(self, font_family="sans", font_style="Regular", name=None)
stroke_color
Stroke color.
fill_saturation
Saturation 0-100.
fill_brightness
Brightness 0-100.
stroke_width
Stroke width.
def add_keyframe(self, time, item)
def get_value(self, time)
time
Start time of keyframe segment.
def __init__(self, time=0, start=None)
start
Start value of keyframe segment.
def get_value(self, time)
wrap_size
Size of the box containing the text.
def __init__(self, text="", font_size=10, color=None, font_family="")
line_height
Line height when wrapping.