python-lottie  0.6.8+dev6bb61be
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.objects.shapes.Group Class Reference

ShapeElement that can contain other shapes. More...

Inheritance diagram for lottie.objects.shapes.Group:
[legend]
Collaboration diagram for lottie.objects.shapes.Group:
[legend]

Public Member Functions

def __init__ (self)
 
def transform (self)
 
def bounding_box (self, time=0)
 Bounding box of the shape element at the given time. More...
 
def add_shape (self, shape)
 
def insert_shape (self, index, shape)
 
def load (cls, lottiedict)
 Loads from a JSON object. More...
 
- Public Member Functions inherited from lottie.objects.shapes.ShapeElement
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 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...
 
- Public Member Functions inherited from lottie.objects.base.LottieObjectMeta
def __new__ (cls, name, bases, attr)
 

Public Attributes

 number_of_properties
 Group number of properties. More...
 
 shapes
 Group list of items. More...
 
- Public Attributes inherited from lottie.objects.shapes.ShapeElement
 name
 After Effect's Name. More...
 
 property_index
 Property index. More...
 
 hidden
 Hide element. More...
 
 bm
 

Static Public Attributes

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

Detailed Description

ShapeElement that can contain other shapes.

Note
Shapes inside the same group will create "holes" in other shapes
Lottie JSON
Lottie name Type Description Attribute
hd bool Hide element.   hidden
nm str After Effect's Name.   name
ty str = 'gr' Shape type.   type
cix int Property index.   property_index
bm int   bm
np float Group number of properties.   number_of_properties
it list of ShapeElement Group list of items.   shapes

Definition at line 428 of file shapes.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from lottie.objects.shapes.ShapeElement.

Definition at line 440 of file shapes.py.

Member Function Documentation

◆ add_shape()

def lottie.objects.shapes.Group.add_shape (   self,
  shape 
)

Definition at line 471 of file shapes.py.

◆ bounding_box()

def lottie.objects.shapes.Group.bounding_box (   self,
  time = 0 
)

Bounding box of the shape element at the given time.

Reimplemented from lottie.objects.shapes.ShapeElement.

Definition at line 451 of file shapes.py.

◆ insert_shape()

def lottie.objects.shapes.Group.insert_shape (   self,
  index,
  shape 
)

Definition at line 475 of file shapes.py.

◆ load()

def lottie.objects.shapes.Group.load (   cls,
  lottiedict 
)

Loads from a JSON object.

Returns
An instance of the class

Reimplemented from lottie.objects.base.LottieObject.

Definition at line 480 of file shapes.py.

◆ transform()

def lottie.objects.shapes.Group.transform (   self)

Definition at line 448 of file shapes.py.

Member Data Documentation

◆ number_of_properties

lottie.objects.shapes.Group.number_of_properties

Group number of properties.

Used for expressions.

Definition at line 443 of file shapes.py.

◆ shapes

lottie.objects.shapes.Group.shapes

Group list of items.

Definition at line 445 of file shapes.py.

◆ type

string lottie.objects.shapes.Group.type = "gr"
static

Shape type.

Definition at line 438 of file shapes.py.


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