ooodev.adapter.awt.gradient_struct_comp module

class ooodev.adapter.awt.gradient_struct_comp.GradientStructComp(component, prop_name, event_provider=None)[source]

Bases: StructBase[Gradient]

Gradient Struct.

This class raises an event before and after a property is changed if it has been passed an event provider.

The event raised before the property is changed is called com_sun_star_awt_Gradient_changing. The event raised after the property is changed is called com_sun_star_awt_Gradient_changed.

The event args for before the property is changed is of type KeyValCancelArgs. The event args for after the property is changed is of type KeyValArgs.

__init__(component, prop_name, event_provider=None)[source]

Constructor

Parameters:
  • component (Gradient) – Gradient.

  • prop_name (str) – Property Name. This value is assigned to the prop_name of event_data.

  • event_provider (EventsT, optional) – Event Provider.

Return type:

None

property angle: Angle10

Gets/Sets angle of the gradient in 1/10 degree.

When setting the value can be set with an int in 1/10 degrees or an AngleT instance.

Returns:

Angle in 1/10 degree.

Return type:

Angle10

Hint

  • Angle10 can be imported from ooodev.units.

property border: int

Gets/Sets per cent of the total width where just the start color is used.

Must be from 0 to 100.

Return type:

int

property end_color: Color

Gets/Sets the color at the end point of the gradient.

Returns:

Color

Return type:

Color

property end_intensity: Intensity

Gets/Sets the intensity at the end point of the gradient.

Returns:

Intensity at the end point of the gradient.

Return type:

Intensity

Hint

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

property start_color: Color

Gets/Sets the color at the start point of the gradient.

Returns:

Color

Return type:

Color

property start_intensity: Intensity

Specifies the intensity at the start point of the gradient.

What that means is undefined.

Returns:

Intensity at the start point of the gradient.

Return type:

Intensity

Hint

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

property step_count: int

Gets/Sets the number of steps of change color.

Return type:

int

property style: GradientStyle

Gets/Sets the style of the gradient.

Returns:

Gradient Style.

Return type:

GradientStyle

Hint

  • GradientStyle can be imported from ooodev.awt.gradient_style

property x_offset: int

Gets/Sets the X-coordinate, where the gradient begins.

This is effectively the center of the RADIAL, ELLIPTICAL, SQUARE and RECT style gradients.

Must be from 0 to 100.

Return type:

int

property y_offset: int

Gets/Sets the Y-coordinate, where the gradient begins.

Must be from 0 to 100.

Return type:

int