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. Default0
.distance (int, UnitT, optional) – Specifies the distance between the lines in the hatch (in
mm
units) or Class UnitT. Default0.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 representsobj
hatch properties.- Return type:
- classmethod from_uno_struct(value)[source]
- classmethod from_uno_struct(value, **kwargs)
- classmethod from_uno_struct(value, **kwargs)
Converts a
Hatch
instance to aHatchStruct
- Parameters:
value (Hatch) – UNO Hatch
- Returns:
HatchStruct
set withHatch
properties- 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
mm
units).- 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