ooodev.adapter.awt.view_partial module

class ooodev.adapter.awt.view_partial.ViewPartial(component, interface=com.sun.star.awt.XView)[source]

Bases: object

Partial class for XView.

Parameters:
  • component (XView) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.awt.XView)[source]

Constructor

Parameters:
  • component (XView) – UNO Component that implements com.sun.star.awt.XView interface.

  • interface (UnoInterface, optional) – The interface to be validated. Defaults to XView.

Return type:

None

draw(x, y)[source]

Draws the object at the specified position.

If the output should be clipped, the caller has to set the clipping region.

Parameters:
  • x (int | UnitT) – X coordinate in device units. If int then pixel units.

  • y (int | UnitT) – Y coordinate in device units. If int then pixel units.

Return type:

None

get_graphics()[source]

Gets the output device which was set using the method XView.setGraphics().

Return type:

XGraphics

get_size()[source]

Gets the size of the object in device units.

A device must be set before.

Returns:

Size of the object in pixel units.

Return type:

SizePX

set_graphics(device)[source]

Sets the output device.

Return type:

bool

Parameters:

device (com.sun.star.awt.XGraphics) –

set_zoom(x, y)[source]

Sets the zoom factor.

The zoom factor only affects the content of the view, not the size.

Return type:

None

Parameters:
  • x (float) –

  • y (float) –