python-lottie  0.6.11+deva0e77a1
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:
Collaboration diagram for lottie.objects.shapes.Group:

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

Public Attributes

 Group number of properties. More...
 Group list of items. 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

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.

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

Definition at line 433 of file

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from lottie.objects.shapes.ShapeElement.

Definition at line 445 of file

Member Function Documentation

◆ add_shape()

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

Definition at line 476 of file

◆ 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 456 of file

◆ insert_shape()

def lottie.objects.shapes.Group.insert_shape (   self,

Definition at line 480 of file

◆ load()

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

Loads from a JSON object.

An instance of the class

Reimplemented from lottie.objects.base.LottieObject.

Definition at line 485 of file

◆ transform()

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

Definition at line 453 of file

Member Data Documentation

◆ number_of_properties


Group number of properties.

Used for expressions.

Definition at line 448 of file

◆ shapes


Group list of items.

Definition at line 450 of file

◆ type

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

Shape type.

Definition at line 443 of file

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