ooodev.format.draw.direct.position_size.position_size package

Submodules

Module contents

class ooodev.format.draw.direct.position_size.position_size.Adapt(fit_height=None, fit_width=None)[source]

Bases: Adapt

Shape Adapt (only for Shape Text Boxes).

New in version 0.17.3.

__init__(fit_height=None, fit_width=None)[source]

Constructor

Parameters:
  • fit_height (bool, optional) – Expands the width of the object to the width of the text, if the object is smaller than the text.

  • fit_width (bool, optional) – Expands the height of the object to the height of the text, if the object is smaller than the text.

Return type:

None

Note

Adapt is only available for Text Boxes.

New in version 0.17.3.

class ooodev.format.draw.direct.position_size.position_size.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.

class ooodev.format.draw.direct.position_size.position_size.Protect(position=None, size=None)[source]

Bases: Protect

Shape Protection

New in version 0.17.3.

__init__(position=None, size=None)[source]

Constructor

Parameters:
  • size (bool, optional) – Specifies size protection.

  • position (bool, optional) – Specifies position protection.

Return type:

None

class ooodev.format.draw.direct.position_size.position_size.Size(width, height, base_point=ShapeBasePointKind.TOP_LEFT)[source]

Bases: Size

Shape Size

New in version 0.17.3.

__init__(width, height, base_point=ShapeBasePointKind.TOP_LEFT)[source]

Constructor

Parameters:
  • width (float | UnitT) – Specifies the width of the shape (in mm units) or Class UnitT.

  • height (float | UnitT) – Specifies the height 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