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:
StructBaseRepresents UNO
Hatchstruct.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. Default0.distance (int, UnitT, optional) – Specifies the distance between the lines in the hatch (in
mmunits) or Class UnitT. Default0.0angle (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.ParagraphPropertiesservice.- 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
objdoes not have required property- Returns:
HatchStructinstance that representsobjhatch properties.- Return type:
- classmethod from_uno_struct(value)[source]
- classmethod from_uno_struct(value, **kwargs)
- classmethod from_uno_struct(value, **kwargs)
Converts a
Hatchinstance to aHatchStruct- Parameters:
value (Hatch) – UNO Hatch
- Returns:
HatchStructset withHatchproperties- Return type:
- get_attrs()[source]
Gets the attributes that are slated for change in the current instance
- Returns:
Tuple of attributes
- Return type:
Tuple(str, …)
- 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
mmunits).- Return type:
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_style: HatchStyle
Gets/Sets the style of the hatch.
- Return type:
HatchStyle