ooodev.format.writer.direct.shape.shadow package

Module contents

class ooodev.format.writer.direct.shape.shadow.Shadow(*, use_shadow=None, location=None, color=None, distance=None, blur=None, transparency=None)[source]

Bases: StyleBase

Shape Shadow

New in version 0.9.0.

__init__(*, use_shadow=None, location=None, color=None, distance=None, blur=None, transparency=None)[source]

Constructor

Parameters:
  • use_shadow (bool, optional) – Specifies if shadow is used.

  • location (ShadowLocationKind , optional) – Specifies the shadow location.

  • color (Color , optional) – Specifies shadow color.

  • distance (float, UnitT , optional) – Specifies shadow distance in mm units or Class UnitT.

  • blur (int, UnitT, optional) – Specifies shadow blur in pt units or Class UnitT.

  • transparency (int , optional) – Specifies shadow transparency value from 0 to 100.

Return type:

None

copy()[source]

Gets a copy of instance as a new instance

Return type:

TypeVar(_TShadow, bound= Shadow)

Parameters:

self (_TShadow) –

fmt_blur(value=None)[source]

Get copy of instance with use shadow blur or removed.

Parameters:
  • value (int, UnitT, optional) – Specifies shadow blur in pt units or Class UnitT.

  • self (_TShadow) –

Returns:

Shadow with style added or removed

Return type:

Shadow

fmt_color(value=None)[source]

Get copy of instance with use shadow color or removed.

Parameters:
  • value (Color, optional) – Specifies shadow color.

  • self (_TShadow) –

Returns:

Shadow with style added or removed

Return type:

Shadow

fmt_distance(value=None)[source]

Get copy of instance with use shadow distance or removed.

Parameters:
  • value (float, UnitT, optional) – Specifies shadow distance in mm units or Class UnitT.

  • self (_TShadow) –

Returns:

Shadow with style added or removed

Return type:

Shadow

fmt_location(value=None)[source]

Get copy of instance with use shadow location or removed.

Parameters:
  • value (ShadowLocationKind, optional) – Specifies the shadow location.

  • self (_TShadow) –

Returns:

Shadow with style added or removed

Return type:

Shadow

fmt_transparency(value=None)[source]

Get copy of instance with use shadow transparency or removed.

Parameters:
  • value (int, Intensity, optional) – Specifies shadow transparency value from 0 to 100.

  • self (_TShadow) –

Returns:

Shadow with style added or removed

Return type:

Shadow

fmt_use_shadow(value=None)[source]

Get copy of instance with use shadow set or removed.

Parameters:
  • value (bool, optional) – Specifies if shadow is used.

  • self (_TShadow) –

Returns:

Shadow with style added or removed

Return type:

Shadow

classmethod from_obj(obj)[source]
classmethod from_obj(obj, **kwargs)
classmethod from_obj(obj, **kwargs)

Gets instance from object

Parameters:

obj (object) – UNO Object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Instance that represents Shadow settings.

Return type:

Shadow

property bottom: _TShadow

Gets instance with shadow location set to bottom.

Return type:

TypeVar(_TShadow, bound= Shadow)

property bottom_left: _TShadow

Gets instance with shadow location set to bottom left.

Return type:

TypeVar(_TShadow, bound= Shadow)

property bottom_right: _TShadow

Gets instance with shadow location set to bottom right.

Return type:

TypeVar(_TShadow, bound= Shadow)

property left: _TShadow

Gets instance with shadow location set to left.

Return type:

TypeVar(_TShadow, bound= Shadow)

property prop_blur: UnitPT | None

Gets/Sets Shadow blur value. Return value is in pt (points) units.

Return type:

UnitPT | None

property prop_color: Color | None

Gets/Sets Shadow color value

Return type:

Color | None

property prop_distance: UnitMM | None

Gets/Sets Shadow distance value. Return value is in mm units.

Return type:

UnitMM | None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_location: ShadowLocationKind | None

Gets/Sets Shadow location value

Return type:

ShadowLocationKind | None

property prop_transparency: Intensity | None

Gets/Sets Shadow transparency value

Return type:

Intensity | None

property prop_use_shadow: bool | None

Gets/Sets Shadow using value

Return type:

bool | None

property right: _TShadow

Gets instance with shadow location set to right.

Return type:

TypeVar(_TShadow, bound= Shadow)

property top: _TShadow

Gets instance with shadow location set to top.

Return type:

TypeVar(_TShadow, bound= Shadow)

property top_left: _TShadow

Gets instance with shadow location set to top left.

Return type:

TypeVar(_TShadow, bound= Shadow)

property top_right: _TShadow

Gets instance with shadow location set to top right.

Return type:

TypeVar(_TShadow, bound= Shadow)

property use_shadow: _TShadow

Gets instance with use shadow set to True.

Return type:

TypeVar(_TShadow, bound= Shadow)