ooodev.format.inner.direct.write.para.area.hatch module
- class ooodev.format.inner.direct.write.para.area.hatch.Hatch(*, style=HatchStyle.SINGLE, color=0, space=0.0, angle=0, bg_color=-1, name='', auto_name=False)[source]
Bases:
StyleMulti
Class for Fill Properties Fill Hatch.
New in version 0.9.0.
- __init__(*, style=HatchStyle.SINGLE, color=0, space=0.0, angle=0, bg_color=-1, name='', auto_name=False)[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
.space (float, UnitT, optional) – Specifies the space 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
.bg_color (
Color
, optional) – Specifies the background Color. Set this-1
(default) for no background color.name (str, optional) – Specifies the Hatch Name.
auto_name (bool, optional) – Specifies if Hatch is give an auto name such as
Hatch
. DefaultFalse
.
- Return type:
None
- apply(obj: Any)[source]
- apply(obj: Any, **kwargs)
- apply(obj, **kwargs)
Applies styles to object
- Parameters:
obj (object) – UNO object.
- Return type:
None
- copy()[source]
- copy(**kwargs)
- copy(**kwargs)
Gets a copy of instance as a new instance
- Return type:
TypeVar
(_THatch
, bound= Hatch)- Parameters:
self (_THatch) –
- 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:
NotSupportedError – If
obj
is not supported.- Returns:
Hatch
instance that representsobj
hatch pattern.- Return type:
- classmethod from_preset(preset)[source]
- classmethod from_preset(preset, **kwargs)
- classmethod from_preset(preset, **kwargs)
Gets an instance from a preset
- Parameters:
preset (PresetHatchKind) – Preset
- Returns:
Instance from preset.
- Return type:
- property prop_color: Color
Gets/Sets the color of the hatch lines.
- Return type:
NewType()
(Color
,int
)
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type:
- property prop_inner_hatch: HatchStruct
Gets Hatch struct instance
- Return type:
- property prop_name: str
Gets the name of the hatch.
- Return type:
str
- property prop_space: UnitT
Gets/Sets the distance between the lines in the hatch (in
mm
units).- Return type:
- property prop_style: HatchStyle
Gets/Sets the style of the hatch.
- Return type:
HatchStyle