python-lottie  0.7.0+dev66cafb9
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.objects.layers.SolidColorLayer Class Reference

Layer with a solid color rectangle. More...

Inheritance diagram for lottie.objects.layers.SolidColorLayer:
[legend]
Collaboration diagram for lottie.objects.layers.SolidColorLayer:
[legend]

Public Member Functions

def __init__ (self, color=Color(), width=512, height=512)
 
- Public Member Functions inherited from lottie.objects.layers.VisualLayer
def has_masks (self)
 Whether the layer has some masks applied. More...
 
def __init__ (self)
 
def add_child (self, layer)
 
def parent (self)
 
def parent (self, layer)
 
def children (self)
 
def __repr__ (self)
 
def __str__ (self)
 
def remove (self)
 Removes this layer from the componsitin. More...
 
- 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

 color
 Color of the layer as a #rrggbb hex. More...
 
 height
 Height of the layer. More...
 
 width
 Width of the layer. More...
 
- Public Attributes inherited from lottie.objects.layers.VisualLayer
 collapse_transform
 
 transform
 Transform properties. More...
 
 auto_orient
 Auto-Orient along path AE property. More...
 
 css_class
 CSS class used by the SVG renderer. More...
 
 layer_xml_id
 id attribute used by the SVG renderer More...
 
 layer_xml_tag_name
 tag name used by the SVG renderer More...
 
 motion_blur
 Whether motion blur is enabled for the layer. More...
 
 layer_style
 Styling effects for this layer. More...
 
 effects
 List of Effects. More...
 
 stretch
 Layer Time Stretching. More...
 
 masks
 List of Masks. More...
 
 blend_mode
 Blend Mode. More...
 
 matte_mode
 Matte mode, the layer will inherit the transparency from the layer above. More...
 
 matte_target
 
 matte_parent
 
 composition
 Composition owning the layer, set by add_layer. More...
 
 parent_index
 
- Public Attributes inherited from lottie.objects.layers.Layer
 threedimensional
 Whether the layer is threedimensional. More...
 
 hidden
 Whether the layer is hidden. More...
 
 index
 Index that can be used for parenting and referenced in expressions. More...
 
 parent_index
 Must be the ind property of another layer. More...
 
 time_stretch
 
 in_point
 Frame when the layer becomes visible. More...
 
 out_point
 Frame when the layer becomes invisible. More...
 
 start_time
 Start Time of layer. More...
 
 is_guide
 When true, the layer should not be rendered. More...
 
- Public Attributes inherited from lottie.objects.helpers.VisualObject
 name
 
 match_name
 

Static Public Attributes

int type = 1
 Layer type. More...
 
- Static Public Attributes inherited from lottie.objects.layers.Layer
 type = None
 Layer type. More...
 

Detailed Description

Layer with a solid color rectangle.

Lottie JSON
Lottie name Type Description Attribute
nm str   name
mn str   match_name
ddd 0-1 int Whether the layer is threedimensional.   threedimensional
hd bool Whether the layer is hidden.   hidden
guide bool When true, the layer should not be rendered.   is_guide
ty int = 1 Layer type.   type
ind int Index that can be used for parenting and referenced in expressions.   index
parent int   parent_index
sr float   time_stretch
ip float Frame when the layer becomes visible.   in_point
op float Frame when the layer becomes invisible.   out_point
st float Start Time of layer.   start_time
cp bool   collapse_transform
ks Transform Transform properties.   transform
ao 0-1 int Auto-Orient along path AE property.   auto_orient
bm BlendMode Blend Mode.   blend_mode
tt MatteMode Matte mode, the layer will inherit the transparency from the layer above.   matte_mode
td int   matte_target
tp int   matte_parent
cl str CSS class used by the SVG renderer.   css_class
ln str id attribute used by the SVG renderer   layer_xml_id
tg str tag name used by the SVG renderer   layer_xml_tag_name
mb bool Whether motion blur is enabled for the layer.   motion_blur
sy list of LayerStyle Styling effects for this layer.   layer_style
hasMask bool Whether the layer has some masks applied.   has_masks
masksProperties list of Mask List of Masks.   masks
ef list of Effect List of Effects.   effects
sc Color string Color of the layer as a #rrggbb hex.   color
sh float Height of the layer.   height
sw float Width of the layer.   width

Definition at line 293 of file layers.py.

Constructor & Destructor Documentation

◆ __init__()

def lottie.objects.layers.SolidColorLayer.__init__ (   self,
  color = Color(),
  width = 512,
  height = 512 
)

Definition at line 305 of file layers.py.

Member Data Documentation

◆ color

lottie.objects.layers.SolidColorLayer.color

Color of the layer as a #rrggbb hex.

Definition at line 308 of file layers.py.

◆ height

lottie.objects.layers.SolidColorLayer.height

Height of the layer.

Definition at line 310 of file layers.py.

◆ type

int lottie.objects.layers.SolidColorLayer.type = 1
static

Layer type.

Definition at line 303 of file layers.py.

◆ width

lottie.objects.layers.SolidColorLayer.width

Width of the layer.

Definition at line 312 of file layers.py.


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