ooodev.format.inner.partial.area.transparency.gradient_partial module

class ooodev.format.inner.partial.area.transparency.gradient_partial.GradientPartial(factory_name, component, lo_inst=None)[source]

Bases: object

Partial class for FillColor.

Parameters:
  • factory_name (str) –

  • component (Any) –

  • lo_inst (LoInst | None) –

__init__(factory_name, component, lo_inst=None)[source]
Parameters:
  • factory_name (str) –

  • component (Any) –

  • lo_inst (LoInst | None) –

Return type:

None

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

Style Area Color.

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).

Raises:

CancelEventError – If the event before_style_area_transparency_gradient is cancelled and not handled.

Returns:

FillColor instance or None if cancelled.

Return type:

GradientT | None

Hint

  • GradientStyle can be imported from ooo.dyn.awt.gradient_style

  • IntensityRange can be imported from ooodev.utils.data_type.intensity_range

  • Offset can be imported from ooodev.utils.data_type.offset

  • Angle can be imported from ooodev.units

  • Intensity can be imported from ooodev.utils.data_type.intensity

style_area_transparency_gradient_get()[source]

Gets the Area Transparency Gradient Style.

Raises:

CancelEventError – If the event before_style_area_transparency_gradient_get is cancelled and not handled.

Returns:

Area transparency style or None if cancelled.

Return type:

GradientT | None