Effects

class mappyng.effects.BoxShadowConfig(dx=2.0, dy=2.0, blur=4.0, color='#000000', opacity=0.25)[source]

Bases: object

Drop-shadow configuration for a viewport or element.

Can be created from a dict, a bool (True for defaults), or directly.

dx

Horizontal shadow offset in SVG px.

Type:

float

dy

Vertical shadow offset in SVG px.

Type:

float

blur

Shadow blur radius in SVG px.

Type:

float

color

Shadow color.

Type:

str

opacity

Shadow opacity 0-1.

Type:

float

__init__(dx=2.0, dy=2.0, blur=4.0, color='#000000', opacity=0.25)
blur: float = 4.0
color: str = '#000000'
dx: float = 2.0
dy: float = 2.0
classmethod from_param(value)[source]

Parse user input into a BoxShadowConfig or None.

  • None / False: None (no shadow)

  • True: default shadow

  • dict: shadow with overrides

  • BoxShadowConfig: passed through

Return type:

Optional[BoxShadowConfig]

opacity: float = 0.25
class mappyng.effects.GlowConfig(blur=6.0, color='#ffffff', opacity=0.6)[source]

Bases: object

Outer glow configuration for a viewport or element.

blur

Glow blur radius in SVG px.

Type:

float

color

Glow color.

Type:

str

opacity

Glow opacity 0-1.

Type:

float

__init__(blur=6.0, color='#ffffff', opacity=0.6)
blur: float = 6.0
color: str = '#ffffff'
classmethod from_param(value)[source]
Return type:

Optional[GlowConfig]

opacity: float = 0.6