python-lottie  0.6.11+devc144cca
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.objects.shapes.Shape Class Reference

Drawable shape. More...

Inheritance diagram for lottie.objects.shapes.Shape:
Collaboration diagram for lottie.objects.shapes.Shape:

Public Member Functions

def __init__ (self)
def to_bezier (self)
 Returns a Path corresponding to this Shape. More...
- Public Member Functions inherited from lottie.objects.shapes.ShapeElement
def bounding_box (self, time=0)
 Bounding box of the shape element at the given time. More...
def __str__ (self)
- 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 clone_into (self, other)
- Public Member Functions inherited from lottie.objects.base.LottieObjectMeta
def __new__ (cls, name, bases, attr)

Public Attributes

 After Effect's Direction. More...
- Public Attributes inherited from lottie.objects.shapes.ShapeElement
 Property index. More...
 Hide element. More...
 Blend mode. More...
- Public Attributes inherited from lottie.objects.helpers.VisualObject

Additional Inherited Members

- Static Public Attributes inherited from lottie.objects.shapes.ShapeElement
 type = None
 Shape type. More...

Detailed Description

Drawable shape.

Lottie JSON
Lottie name Type Description Attribute
nm str   name
mn str   match_name
hd bool Hide element.   hidden
ty str Shape type.   type
cix int Property index.   property_index
bm BlendMode Blend mode.   blend_mode
d ShapeDirection After Effect's Direction.   direction

Definition at line 128 of file

Constructor & Destructor Documentation

◆ __init__()

def lottie.objects.shapes.Shape.__init__ (   self)

Reimplemented from lottie.objects.shapes.ShapeElement.

Reimplemented in lottie.objects.shapes.Star.

Definition at line 136 of file

Member Function Documentation

◆ to_bezier()

def lottie.objects.shapes.Shape.to_bezier (   self)

Returns a Path corresponding to this Shape.

Reimplemented in lottie.objects.shapes.Path, lottie.objects.shapes.Ellipse, lottie.objects.shapes.Star, and lottie.objects.shapes.Rect.

Definition at line 141 of file

Member Data Documentation

◆ direction


After Effect's Direction.

Direction how the shape is drawn. Used for trim path for example.

Definition at line 139 of file

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