ooodev.adapter.graphic.graphic_descriptor_comp module

class ooodev.adapter.graphic.graphic_descriptor_comp.GraphicDescriptorComp(component)[source]

Bases: PropertySetComp

Class for managing GraphicDescriptor Component.

Parameters:

component (GraphicDescriptor) –

__init__(component)[source]

Constructor

Parameters:

component (GraphicDescriptor) – UNO Component that implements com.sun.star.graphic.GraphicDescriptor service.

Return type:

None

property alpha: bool | None

Gets/Sets - Indicates that it is a pixel graphic with an alpha channel.

The status of this flag is not always clear if the graphic was not loaded at all, e.g. in case of just querying for the GraphicDescriptor

optional

Return type:

bool | None

property animated: bool | None

Gets/Sets - Indicates that it is a graphic that consists of several frames that can be played as an animation.

The status of this flag is not always clear if the graphic was not loaded at all, e.g. in case of just querying for the GraphicDescriptor

optional

Return type:

bool | None

property bits_per_pixel: int | None

The number of bits per pixel used for the pixel graphic.

This property is not available for vector graphics and may not be available for some kinds of pixel graphics

optional

Return type:

int | None

property component: com.sun.star.graphic.GraphicDescriptor

GraphicDescriptor Component

Return type:

GraphicDescriptor

property graphic_type: int

Gets/Sets the type of the graphic.

Return type:

int

property linked: bool | None

Gets/Sets - Indicates that the graphic is an external linked graphic.

optional

Return type:

bool | None

property mime_type: str

The MimeType of the loaded graphic.

The mime can be the original mime type of the graphic source the graphic container was constructed from or it can be the internal mime type image/x-vclgraphic, in which case the original mime type is not available anymore

Currently, the following mime types are supported for loaded graphics:

Return type:

str

property origin_url: str | None

Gets/Sets the URL of the location from where the graphic was loaded from.

optional

Return type:

str | None

property size100th_mm: SizeMM100 | None

The Size of the graphic in 100th mm.

This property may not be available in case of pixel graphics or if the logical size can not be determined correctly for some formats without loading the whole graphic

optional

Return type:

SizeMM100 | None

property size_pixel: SizePX | None

The Size of the graphic in pixel.

This property may not be available in case of vector graphics or if the pixel size can not be determined correctly for some formats without loading the whole graphic

optional

Return type:

SizePX | None

property transparent: bool | None

Indicates that it is a transparent graphic.

This property is always True for vector graphics. The status of this flag is not always clear if the graphic was not loaded at all, e.g. in case of just querying for the GraphicDescriptor.

optional

Return type:

bool | None