ooodev.format.inner.partial.position_size.draw.size_partial module

class ooodev.format.inner.partial.position_size.draw.size_partial.SizePartial(factory_name, component, lo_inst=None)[source]

Bases: object

Partial class for Size.

Parameters:
  • factory_name (str) –

  • component (Any) –

  • lo_inst (LoInst | None) –

__init__(factory_name, component, lo_inst=None)[source]
Parameters:
  • factory_name (str) –

  • component (Any) –

  • lo_inst (LoInst | None) –

Return type:

None

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

Style Area Color.

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, optional) – Specifies the base point of the shape used to calculate the X and Y coordinates. Default is TOP_LEFT.

Raises:

CancelEventError – If the event before_style_size is cancelled and not handled.

Returns:

Position instance or None if cancelled.

Return type:

SizeT | None

Hint

  • ShapeBasePointKind can be imported from ooodev.utils.kind.shape_base_point_kind

style_size_get()[source]

Gets the Size Style.

Raises:

CancelEventError – If the event before_style_size_get is cancelled and not handled.

Returns:

Size style or None if cancelled.

Return type:

SizeT | None