ooodev.format.inner.direct.chart2.chart.area.img module

class ooodev.format.inner.direct.chart2.chart.area.img.Img(chart_doc, *, bitmap=None, name='', mode=ImgStyleKind.TILED, size=None, position=None, pos_offset=None, tile_offset=None, auto_name=False)[source]

Bases: Img

Class for Chart Area Fill Image.

New in version 0.9.4.

__init__(chart_doc, *, bitmap=None, name='', mode=ImgStyleKind.TILED, size=None, position=None, pos_offset=None, tile_offset=None, auto_name=False)[source]

Constructor

Parameters:
  • chart_doc (XChartDocument) – Chart document.

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

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

Gets a copy of instance as a new instance

Return type:

Img

classmethod from_obj(chart_doc, obj)[source]
classmethod from_obj(chart_doc, obj, **kwargs)
classmethod from_obj(chart_doc, obj, **kwargs)

Gets instance from object

Parameters:
  • chart_doc (XChartDocument) – Chart document.

  • obj (object) – UNO object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Img instance that represents obj fill image.

Return type:

Img

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

Gets an instance from a preset.

Parameters:
  • chart_doc (XChartDocument) – Chart document.

  • preset (PresetImageKind) – Preset.

Returns:

Instance from preset.

Return type:

Img

prop_bitmap

Descriptor to raise an exception when an attribute is accessed after deletion.