ooodev.format.inner.modify.write.frame.area.pattern module

class ooodev.format.inner.modify.write.frame.area.pattern.Pattern(*, bitmap=None, name='', tile=True, stretch=False, auto_name=False, style_name=StyleFrameKind.FRAME, style_family='FrameStyles')[source]

Bases: FrameStyleBaseMulti

Frame Style Area Pattern.

New in version 0.9.0.

__init__(*, bitmap=None, name='', tile=True, stretch=False, auto_name=False, style_name=StyleFrameKind.FRAME, style_family='FrameStyles')[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 (StyleFrameKind, str, optional) – Specifies the Frame Style that instance applies to. Default is Default Frame Style.

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

Return type:

None

Note

If auto_name is False then a bitmap for a given name is only required the first call. All subsequent call of the same name will retrieve the bitmap form the LibreOffice Bitmap Table.

classmethod from_preset(preset, style_name=StyleFrameKind.FRAME, style_family='FrameStyles')[source]

Gets an instance from a preset.

Parameters:
  • preset (PresetPatternKind) – Preset.

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

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

Returns:

Pattern instance from preset.

Return type:

Pattern

classmethod from_style(doc, style_name=StyleFrameKind.FRAME, style_family='FrameStyles')[source]

Gets instance from Document.

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

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

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

Returns:

Pattern instance from style properties.

Return type:

Pattern

property prop_inner: Pattern

Gets Inner Pattern instance

Return type:

Pattern

property prop_style_name: str

Gets/Sets property Style Name

Return type:

str