ooodev.format.draw.modify.area.pattern module

Module for Draw Style Fill Coloring.

class ooodev.format.draw.modify.area.pattern.Pattern(*, bitmap=None, name='', tile=True, stretch=False, auto_name=False, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]

Bases: FillStyleBaseMulti

Draw Style Fill Pattern

New in version 0.17.9.

__init__(*, bitmap=None, name='', tile=True, stretch=False, auto_name=False, 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 to False.

  • 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.

Return type:

None

classmethod from_preset(preset, style_name='standard', style_family=DrawStyleFamilyKind.GRAPHICS)[source]

Gets an instance from a preset

Parameters:
Returns:

Instance from preset.

Return type:

Pattern

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:

Pattern instance from document properties.

Return type:

Pattern

property prop_inner: Pattern

Gets Inner instance

Return type:

Pattern

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str