ooodev.format.writer.direct.obj.transparency package

Module contents

class ooodev.format.writer.direct.obj.transparency.Gradient(*, style=GradientStyle.LINEAR, offset=Offset(x=50, y=50), angle=0, border=0, grad_intensity=IntensityRange(start=0, end=0), **kwargs)[source]

Bases: StyleMulti

Fill Gradient Color

New in version 0.9.0.

__init__(*, style=GradientStyle.LINEAR, offset=Offset(x=50, y=50), angle=0, border=0, grad_intensity=IntensityRange(start=0, end=0), **kwargs)[source]

Constructor

Parameters:
  • style (GradientStyle, optional) – Specifies the style of the gradient. Defaults to GradientStyle.LINEAR.

  • step_count (int, optional) – Specifies the number of steps of change color. Defaults to 0.

  • offset (offset, optional) – Specifies the X-coordinate (start) and Y-coordinate (end), where the gradient begins. X is effectively the center of the RADIAL, ELLIPTICAL, SQUARE and RECT style gradients. Defaults to Offset(50, 50).

  • angle (Angle, int, optional) – Specifies angle of the gradient. Defaults to 0.

  • border (int, optional) – Specifies percent of the total width where just the start color is used. Defaults to 0.

  • grad_intensity (IntensityRange, optional) – Specifies the intensity at the start point and stop point of the gradient. Defaults to IntensityRange(0, 0).

  • kwargs (Any) –

Return type:

None

copy()[source]
copy(**kwargs)
copy(**kwargs)

Gets a copy of instance as a new instance

Return type:

TypeVar(_TGradient, bound= Gradient)

Parameters:

self (_TGradient) –

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 Gradient color.

Return type:

Gradient

on_property_setting(source, event_args)[source]

Triggers for each property that is set

Parameters:
  • event_args (KeyValueCancelArgs) – Event Args

  • source (Any) –

Return type:

None

property default: _TGradient

Gets Gradient empty. Static Property.

Return type:

TypeVar(_TGradient, bound= Gradient)

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_inner: GradientStruct

Gets Fill Transparent Gradient instance

Return type:

GradientStruct

class ooodev.format.writer.direct.obj.transparency.Transparency(value=0)[source]

Bases: StyleBase

Fill Transparency

New in version 0.9.0.

__init__(value=0)[source]

Constructor

Parameters:

value (Intensity, int, optional) – Specifies the transparency value from 0 to 100.

Return type:

None

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

Gets instance from object

Parameters:

obj (object) – Object that implements com.sun.star.drawing.FillProperties service

Returns:

Instance that represents Gradient color.

Return type:

Gradient

property default: _TTransparency

Gets Transparency Default.

Return type:

TypeVar(_TTransparency, bound= Transparency)

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_value: Intensity

Gets/Sets Transparency value

Return type:

Intensity