python-lottie 0.7.0+dev36100d3
A framework to work with lottie files and telegram animated stickers (tgs)
Loading...
Searching...
No Matches
lottie.objects.shapes.Path Class Reference

Animatable Bezier curve. More...

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

Public Member Functions

 __init__ (self, bezier=None)
 
 bounding_box (self, time=0)
 Bounding box of the shape element at the given time.
 
 to_bezier (self)
 Returns a Path corresponding to this Shape.
 
- Public Member Functions inherited from lottie.objects.shapes.ShapeElement
 __str__ (self)
 
- Public Member Functions inherited from lottie.objects.base.LottieObject
 to_dict (self)
 Serializes into a JSON object fit for the Lottie format.
 
 load (cls, lottiedict)
 Loads from a JSON object.
 
 find (self, search, propname="name")
 Recursively searches for child objects with a matching property.
 
 find_all (self, type, predicate=None, include_self=True)
 Find all child objects that match a predicate.
 
 clone (self)
 Returns a copy of the object.
 
 clone_into (self, other)
 
- Public Member Functions inherited from lottie.objects.base.LottieObjectMeta
 __new__ (cls, name, bases, attr)
 

Public Attributes

 shape
 Shape's vertices.
 
 index
 
- Public Attributes inherited from lottie.objects.shapes.Shape
 direction
 After Effect's Direction.
 
- Public Attributes inherited from lottie.objects.shapes.ShapeElement
 property_index
 Property index.
 
 hidden
 Hide element.
 
 blend_mode
 Blend mode.
 
 css_class
 CSS class used by the SVG renderer.
 
 layer_xml_id
 id attribute used by the SVG renderer
 
- Public Attributes inherited from lottie.objects.helpers.VisualObject
 name
 
 match_name
 

Static Public Attributes

str type = "sh"
 Shape type.
 
- Static Public Attributes inherited from lottie.objects.shapes.ShapeElement
 type = None
 Shape type.
 

Static Protected Attributes

list _props
 
- Static Protected Attributes inherited from lottie.objects.shapes.Shape
list _props
 
- Static Protected Attributes inherited from lottie.objects.shapes.ShapeElement
list _props
 
 _shape_classses = None
 
- Static Protected Attributes inherited from lottie.objects.helpers.VisualObject
list _props
 

Additional Inherited Members

- Protected Member Functions inherited from lottie.objects.shapes.ShapeElement
 _load_get_class (cls, lottiedict)
 
 _load_sub (cls, dict)
 

Detailed Description

Animatable Bezier curve.

Lottie JSON
Lottie name Type Description Attribute
nm str   name
mn str   match_name
hd bool Hide element.   hidden
ty str = 'sh' Shape type.   type
bm BlendMode Blend mode.   blend_mode
ix int Property index.   property_index
cl str CSS class used by the SVG renderer.   css_class
ln str id attribute used by the SVG renderer   layer_xml_id
d ShapeDirection After Effect's Direction.   direction
ks ShapeProperty Shape's vertices.   shape
ind int   index

Definition at line 401 of file shapes.py.

Constructor & Destructor Documentation

◆ __init__()

lottie.objects.shapes.Path.__init__ (   self,
  bezier = None 
)

Reimplemented from lottie.objects.shapes.Shape.

Definition at line 412 of file shapes.py.

Member Function Documentation

◆ bounding_box()

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

Bounding box of the shape element at the given time.

Reimplemented from lottie.objects.shapes.ShapeElement.

Definition at line 419 of file shapes.py.

◆ to_bezier()

lottie.objects.shapes.Path.to_bezier (   self)

Returns a Path corresponding to this Shape.

Reimplemented from lottie.objects.shapes.Shape.

Definition at line 430 of file shapes.py.

Member Data Documentation

◆ _props

list lottie.objects.shapes.Path._props
staticprotected
Initial value:
= [
LottieProp("shape", "ks", ShapeProperty, False),
LottieProp("index", "ind", int, False),
]

Definition at line 405 of file shapes.py.

◆ index

lottie.objects.shapes.Path.index
Todo:
Index?

Definition at line 417 of file shapes.py.

◆ shape

lottie.objects.shapes.Path.shape

Shape's vertices.

Definition at line 415 of file shapes.py.

◆ type

str lottie.objects.shapes.Path.type = "sh"
static

Shape type.

Definition at line 410 of file shapes.py.


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