ooodev.format.draw.direct.position_size.position_size.position module

class ooodev.format.draw.direct.position_size.position_size.position.Position(pos_x, pos_y, base_point=ShapeBasePointKind.TOP_LEFT)[source]

Bases: Position

Shape Position

New in version 0.17.3.

__init__(pos_x, pos_y, base_point=ShapeBasePointKind.TOP_LEFT)[source]

Constructor

Parameters:
  • pos_x (float | UnitT) – Specifies the x-coordinate of the position of the shape (in mm units) or Class UnitT.

  • pos_y (float | UnitT) – Specifies the y-coordinate of the position of the shape (in mm units) or Class UnitT.

  • base_point (ShapeBasePointKind) – Specifies the base point of the shape used to calculate the X and Y coordinates. Default is TOP_LEFT.

Return type:

None

Note

pos_x and pos_y are the coordinates of the shape inside the draw page borders. This is the same behavior as the dialog box. If the draw page has a border of 10mm and the shape is positioned at 0mm,0mm in the dialog box then the shape is actually at 10mm,10mm relative to the draw page document.