ooodev.format.draw.modify.area.hatch module
Module for Draw Style Fill Coloring.
- class ooodev.format.draw.modify.area.hatch.Hatch(*, style=HatchStyle.SINGLE, color=0, space=0.0, angle=0, bg_color=-1, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Bases:
FillStyleBaseMulti
Draw Style Fill Hatch
See also
New in version 0.17.9.
- __init__(*, style=HatchStyle.SINGLE, color=0, space=0.0, angle=0, bg_color=-1, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Constructor
- Parameters:
bitmap (XBitmap, optional) – Bitmap instance. If
name
is not already in the Bitmap Table then this property is required.name (str, optional) – Specifies the name of the pattern. This is also the name that is used to store bitmap in LibreOffice Bitmap Table.
tile (bool, optional) – Specified if bitmap is tiled. Defaults to
True
.stretch (bool, optional) – Specifies if bitmap is stretched. Defaults to
False
.auto_name (bool, optional) – Specifies if
name
is ensured to be unique. Defaults toFalse
.style_name (FamilyGraphics, str, optional) – Specifies the Style that instance applies to. Default is Default
standard
Style.style_family (str, DrawStyleFamilyKind, optional) – Family Style. Defaults to
graphics
.style (HatchStyle) –
color (Color) –
space (float | UnitT) –
angle (Angle | int) –
bg_color (Color) –
- Return type:
None
See also
- classmethod from_preset(preset, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Gets an instance from a preset
- Parameters:
preset (PresetHatchKind) – Preset
style_name (str) –
style_family (str | DrawStyleFamilyKind) –
- Returns:
Instance from preset.
- Return type:
- classmethod from_style(doc, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]
Gets instance from Document.
- Parameters:
doc (Any) – UNO Document Object.
style_name (FamilyGraphics, str, optional) – Specifies the Style that instance applies to. Default is
FamilyGraphics.DEFAULT_DRAWING_STYLE
.style_family (DrawStyleFamilyKind, str, optional) – Style family. Default
DrawStyleFamilyKind.GRAPHICS
.
- Returns:
Hatch
instance from document properties.- Return type:
- property prop_style_name: str
Gets/Sets property Style Name
- Return type:
str