ooodev.format.inner.direct.write.para.area.img module
- class ooodev.format.inner.direct.write.para.area.img.Img(*, bitmap=None, name='', mode=ImgStyleKind.TILED, size=None, position=None, pos_offset=None, tile_offset=None, auto_name=False)[source]
Bases:
StyleMulti
Paragraph Area Image Style
New in version 0.9.0.
- __init__(*, bitmap=None, name='', mode=ImgStyleKind.TILED, size=None, position=None, pos_offset=None, tile_offset=None, 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 image. This is also the name that is used to store bitmap in LibreOffice Bitmap Table.
mode (ImgStyleKind, optional) – Specifies the image style, tiled, stretched etc. Default
ImgStyleKind.TILED
.size (SizePercent, SizeMM, optional) – Size in percent (
0 - 100
) or size inmm
units.position (RectanglePoint) – Tiling position of Image.
pos_offset (Offset, optional) – Tiling position offset.
tile_offset (OffsetColumn, OffsetRow, optional) – The tiling offset.
auto_name (bool, optional) – Specifies if
name
is ensured to be unique. Defaults toFalse
.
- Return type:
None
Note
If
auto_name
isFalse
then a bitmap for a givenname
is only required the first call. All subsequent call of the samename
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 that has supports
com.sun.star.style.FillProperties
orcom.sun.star.beans.PropertySet
service.- 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:
Img
instance that representsobj
fill image.- Return type:
- classmethod from_preset(preset)[source]
- classmethod from_preset(preset, **kwargs)
- classmethod from_preset(preset, **kwargs)
Gets an instance from a preset.
- Parameters:
preset (PresetImageKind) – Preset.
- Returns:
Instance from preset.
- Return type:
- 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
- on_property_setting(source, event_args)[source]
Triggers for each property that is set
- 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: