ooodev.format.inner.direct.structs.hatch_struct module

Module for Hatch struct.

New in version 0.9.0.

class ooodev.format.inner.direct.structs.hatch_struct.HatchStruct(*, style=HatchStyle.SINGLE, color=0, distance=0.0, angle=0)[source]

Bases: StructBase

Represents UNO Hatch struct.

New in version 0.9.0.

__init__(*, style=HatchStyle.SINGLE, color=0, distance=0.0, angle=0)[source]

Constructor

Parameters:
  • style (HatchStyle, optional) – Specifies the kind of lines used to draw this hatch. Default HatchStyle.SINGLE.

  • color (Color, optional) – Specifies the color of the hatch lines. Default 0.

  • distance (int, UnitT, optional) – Specifies the distance between the lines in the hatch (in mm units) or Class UnitT. Default 0.0

  • angle (Angle, int, optional) – Specifies angle of the hatch in degrees. Default to 0.

Return type:

None

apply(obj: Any)[source]
apply(obj, **kwargs)

Applies tab properties to obj

Parameters:

obj (object) – UNO object that supports com.sun.star.style.ParagraphProperties service.

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) – UNO object

Raises:

PropertyNotFoundError – If obj does not have required property

Returns:

HatchStruct instance that represents obj hatch properties.

Return type:

HatchStruct

classmethod from_uno_struct(value)[source]
classmethod from_uno_struct(value, **kwargs)
classmethod from_uno_struct(value, **kwargs)

Converts a Hatch instance to a HatchStruct

Parameters:

value (Hatch) – UNO Hatch

Returns:

HatchStruct set with Hatch properties

Return type:

HatchStruct

get_attrs()[source]

Gets the attributes that are slated for change in the current instance

Returns:

Tuple of attributes

Return type:

Tuple(str, …)

get_uno_struct()[source]

Gets UNO Hatch from instance.

Returns:

Hatch instance

Return type:

Hatch

property prop_angle: Angle

Gets/Sets angle of the hatch.

Return type:

Angle

property prop_color: Color

Gets/Sets the color of the hatch lines.

Return type:

NewType()(Color, int)

property prop_distance: UnitMM

Gets/Sets the distance between the lines in the hatch (in mm units).

Return type:

UnitMM

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_style: HatchStyle

Gets/Sets the style of the hatch.

Return type:

HatchStyle