ooodev.format.draw.modify.transparency.gradient module

Draw Fill Transparency Gradient.

New in version 0.17.9.

class ooodev.format.draw.modify.transparency.gradient.Gradient(style=GradientStyle.LINEAR, offset=Offset(x=50, y=50), angle=0, border=0, grad_intensity=IntensityRange(start=0, end=0), style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS, **kwargs)[source]

Bases: FillPropertiesStyleBaseMulti

Gradient Style value.

New in version 0.17.9.

__init__(style=GradientStyle.LINEAR, offset=Offset(x=50, y=50), angle=0, border=0, grad_intensity=IntensityRange(start=0, end=0), style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS, **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).

  • style_name (FamilyGraphics, str, optional) – Specifies the Style that instance applies to. Default is Default standard Style.

  • style_family (str, DrawStyleFamilyKind, optional) – Family Style. Defaults to graphics.

  • kwargs (Any) –

Return type:

None

classmethod from_style(doc, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]

Gets instance from Document.

Parameters:
  • doc (Any) – UNO Document Object.

  • style_name (FamilyGraphics, str, optional) – Specifies the Style that instance applies to. Default is FamilyGraphics.DEFAULT_DRAWING_STYLE.

  • style_family (DrawStyleFamilyKind, str, optional) – Style family. Default DrawStyleFamilyKind.GRAPHICS.

Returns:

Gradient instance from document properties.

Return type:

Gradient

property prop_inner: Gradient

Gets/Sets Inner Font instance

Return type:

Gradient

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str