ooodev.format.inner.direct.write.para.area.pattern module

class ooodev.format.inner.direct.write.para.area.pattern.Pattern(*, bitmap=None, name='', tile=True, stretch=False, auto_name=False)[source]

Bases: StyleMulti

Class for Para Fill Pattern.

New in version 0.9.0.

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

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.

apply(obj: Any)[source]
apply(obj: Any, **kwargs)
apply(obj, **kwargs)

Applies styles to object

Parameters:

obj (object) – UNO object.

Return type:

None

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:

Pattern instance that represents obj fill pattern.

Return type:

Pattern

classmethod from_preset(preset)[source]
classmethod from_preset(preset, **kwargs)
classmethod from_preset(preset, **kwargs)

Gets an instance from a preset

Parameters:

preset (PresetPatternKind) – Preset

Returns:

Instance from preset.

Return type:

Pattern

on_property_restore_setting(source, event_args)[source]

Triggers before each property that is about to be set during restore

Parameters:
  • source (Any) – Event Source.

  • event_args (KeyValueCancelArgs) – Event Args

Return type:

None

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind

property prop_inner: Pattern

Gets Fill Pattern instance

Return type:

Pattern