ooodev.format.inner.modify.write.para.area.hatch module

class ooodev.format.inner.modify.write.para.area.hatch.Hatch(*, style=HatchStyle.SINGLE, color=0, space=0.0, angle=0, bg_color=-1, name='', auto_name=False, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]

Bases: ParaStyleBaseMulti

Paragraph Style Gradient Color

New in version 0.9.0.

__init__(*, style=HatchStyle.SINGLE, color=0, space=0.0, angle=0, bg_color=-1, name='', auto_name=False, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[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.

  • space (float, UnitT, optional) – Specifies the space 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.

  • 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 ``. Default ``False.

  • style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default ParagraphStyles.

Return type:

None

static from_preset(preset, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]

Gets instance from preset

Parameters:
Returns:

Hatch from a preset.

Return type:

Hatch

classmethod from_style(doc, style_name=StyleParaKind.STANDARD, style_family='ParagraphStyles')[source]

Gets instance from Document.

Parameters:
  • doc (Any) – UNO Document Object.

  • style_name (StyleParaKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default ParagraphStyles.

Returns:

Alignment instance from document properties.

Return type:

Alignment

property prop_inner: Hatch

Gets/Sets Inner Hatch instance

Return type:

Hatch

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str