ooodev.adapter.drawing.glue_point2_struct_comp module
- class ooodev.adapter.drawing.glue_point2_struct_comp.GluePoint2StructComp(component, prop_name, event_provider=None)[source]
Bases:
StructBase
[GluePoint2
]GluePoint2 Struct
This class raises an event before and after a property is changed if it has been passed an event provider.
The event raised before the property is changed is called
com_sun_star_drawing_GluePoint2_changing
. The event raised after the property is changed is calledcom_sun_star_drawing_GluePoint2_changed
.The event args for before the property is changed is of type
KeyValCancelArgs
. The event args for after the property is changed is of typeKeyValArgs
.- __init__(component, prop_name, event_provider=None)[source]
Constructor
- Parameters:
component (GluePoint2) – Border Line.
prop_name (str) – Property Name. This value is assigned to the
prop_name
ofevent_data
.event_provider (EventsT, optional) – Event Provider.
- Return type:
None
- property escape: EscapeDirection
Gets/Sets the escape direction for a glue point.
The escape direction is the direction the connecting line escapes the shape.
- Returns:
Escape Direction
- Return type:
EscapeDirection
Hint
EscapeDirection
can be imported fromooo.dyn.drawing.escape_direction
.
- property is_relative: bool
Gets/Sets - If this flag is set to
True
, the position of this glue point is given in1/100%
values instead of1/100cm
.- Return type:
bool
- property is_user_defined: bool
Gets/Sets - If this flag is set to
False
, this is a default glue point.Some shapes may have default glue points attached to them which cannot be altered or removed.
- Return type:
bool
- property position: PointStructGenericComp[UnitMM100]
This is the position of this glue point.
Depending on the flag
is_relative
, this is either in1/100cm
or in1/100%
.When setting this value, it can be set with a
Point
instance or aPointStructGenericComp
instance.- Returns:
Position
- Return type:
- property position_alignment: Alignment
Gets/Sets - if this glue points position is not relative, this enum specifies the vertical and horizontal alignment of this point.
The alignment specifies how the glue point is moved if the shape is resized.
- Returns:
Position Alignment
- Return type:
Hint
Alignment
can be imported fromooo.dyn.drawing.alignment
.