ooodev.format.inner.direct.structs.crop_struct module
Module for Image Crop (GraphicCrop
) struct
New in version 0.9.0.
- class ooodev.format.inner.direct.structs.crop_struct.CropStruct(*, left=0.0, right=0.0, top=0.0, bottom=0.0, all=None)[source]
Bases:
StructBase
Crop struct.
Any properties starting with
prop_
set or get current instance values.All methods starting with
fmt_
can be used to chain together Border Table properties.- __init__(*, left=0.0, right=0.0, top=0.0, bottom=0.0, all=None)[source]
Constructor
- Parameters:
left (float, UnitT, optional) – Specifies left crop in
mm
units or Class UnitT. Default0.0
.right (float, UnitT, optional) – Specifies right crop in
mm
units or Class UnitT. Default0.0
.top (float, UnitT, optional) – Specifies top crop in
mm
units or Class UnitT. Default0.0
.bottom (float, UnitT, optional) – Specifies bottom crop in
mm
units or Class UnitT. Default0.0
.all (float, UnitT, optional) – Specifies
left
,right
,top
, andbottom
inmm
units or Class UnitT. If set all other parameters are ignored.
- Return type:
None
- apply(obj: Any)[source]
- apply(obj, **kwargs)
Applies tab properties to
obj
- Parameters:
obj (object) – UNO object.
- Return type:
None
- fmt_all(value)[source]
Gets copy of instance with left, right, top, bottom set.
- Parameters:
value (float, UnitT) – Specifies crop in
mm
units or Class UnitT.self (_TCropStruct) –
- Returns:
Border Table
- Return type:
- fmt_bottom(value)[source]
Gets a copy of instance with bottom set.
- Parameters:
value (float, UnitT) – Specifies bottom crop in
mm
units or Class UnitT.self (_TCropStruct) –
- Return type:
- fmt_left(value)[source]
Gets a copy of instance with left set.
- Parameters:
value (float, UnitT) – Specifies left crop in
mm
units or Class UnitT.self (_TCropStruct) –
- Return type:
- fmt_right(value)[source]
Gets a copy of instance with right set.
- Parameters:
value (float, UnitT) – Specifies right crop in
mm
units or Class UnitT.self (_TCropStruct) –
- Return type:
- fmt_top(value)[source]
Gets a copy of instance with top set.
- Parameters:
value (float, UnitT) – Specifies top crop in
mm
units or Class UnitT.self (_TCropStruct) –
- Return type:
- classmethod from_obj(obj)[source]
- classmethod from_obj(obj, **kwargs)
- classmethod from_obj(obj, **kwargs)
Gets instance from object
- Parameters:
obj (object) – UNO object
- Raises:
PropertyNotFoundError – If
obj
does not have required property- Returns:
CropStruct
instance that representsobj
crop properties.- Return type:
- classmethod from_uno_struct(value)[source]
- classmethod from_uno_struct(value, **kwargs)
- classmethod from_uno_struct(value, **kwargs)
Converts a
GraphicCrop
instance to aCropStruct
.- Parameters:
value (GraphicCrop) – UNO
GraphicCrop
.- Returns:
CropStruct
set withGraphicCrop
properties.- Return type:
- get_uno_struct()[source]
Gets UNO
GraphicCrop
from instance.- Returns:
GraphicCrop
instance- Return type:
GraphicCrop
- property prop_format_kind: FormatKind
Gets the kind of style
- Return type: