CT_Connection
paper-pptx 0.2.0 API reference
A a:stCxn or a:endCxn element.
Specifies a connection between an end-point of a connector and a shape connection point.
Attributes
cx
attributecxLengthcy
attributecyLengthflipH
attributeflipHflipV
attributeflipVhas_ph_elm
attributehas_ph_elmTrue if this shape element has a p:ph descendant, indicating it
is a placeholder shape. False otherwise.
id
attributeid= RequiredAttribute('id', ST_DrawingElementId)idx
attributeidx= RequiredAttribute('idx', XsdUnsignedInt)ph
attributephCT_Placeholder | NoneThe p:ph descendant element if there is one, None otherwise.
ph_idx
attributeph_idxintInteger value of placeholder idx attribute.
Raises ValueError if shape is not a placeholder.
ph_orient
attributeph_orientstrPlaceholder orientation, e.g. 'vert'.
Raises ValueError if shape is not a placeholder.
ph_sz
attributeph_szstrPlaceholder size, e.g. ST_PlaceholderSize.HALF.
Raises ValueError if shape is not a placeholder.
ph_type
attributeph_typePlaceholder type, e.g. ST_PlaceholderType.TITLE ('title').
Raises ValueError if shape is not a placeholder.
rot
attributerotfloatFloat representing degrees this shape is rotated clockwise.
shape_id
attributeshape_idInteger id of this shape
shape_name
attributeshape_nameName of this shape
spPr
attributespPrCT_ShapePropertiestxBody
attributetxBodyChild p:txBody element, None if not present.
x
attributexLengthxfrm
attributexfrmThe a:xfrm grandchild element or None if not found.
This version works for p:sp, p:cxnSp, and p:pic elements, others will need to
override.
xml
attributexmlstrXML string for this element, suitable for testing purposes.
Pretty printed for readability and without an XML declaration at the top.
y
attributeyLengthFunctions
first_child_found_in
funcfirst_child_found_in(*tagnames: str) -> _Element | NoneFirst child with tag in tagnames, or None if not found.
paramtagnamesstr= ()Returns
lxml.etree._Element | Noneget_or_add_xfrm
funcget_or_add_xfrm()Return the a:xfrm grandchild element, newly-added if not present.
This version works for p:sp, p:cxnSp, and p:pic elements, others will need to
override.
insert_element_before
funcinsert_element_before(elm: ElementBase, *tagnames: str)paramelmElementBaseparamtagnamesstr= ()remove_all
funcremove_all(*tagnames: str) -> NoneRemove child elements with tagname (e.g. "a:p") in tagnames.
paramtagnamesstr= ()Returns
Nonexpath
funcxpath(xpath_str: str) -> AnyOverride of lxml _Element.xpath() method.
Provides standard Open XML namespace mapping (nsmap) in centralized location.
paramxpath_strstrReturns
typing.Any