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

Module for Fill Properties Fill Pattern.

New in version 0.9.0.

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

Bases: StyleBase

Class for Fill Properties 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, **kwargs)

Applies styles to object

Parameters:

obj (object) – UNO object that has supports com.sun.star.style.FillProperties or com.sun.star.beans.PropertySet service.

Return type:

None

copy()[source]
copy(**kwargs)
copy(**kwargs)

Gets a copy of instance as a new instance

Return type:

TypeVar(_TPattern, bound= Pattern)

Parameters:

self (_TPattern) –

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:

Pattern 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_stretch: bool

Gets sets if fill image is stretched

Return type:

bool

property prop_tile: bool

Gets sets if fill image is tiled

Return type:

bool