Paper Office
paper-pptxAPI referenceoxml.shapes.shared

CT_ShapeProperties

paper-pptx 0.2.0 API reference

Custom element class for p:spPr element.

Shared by p:sp, p:cxnSp, and p:pic elements as well as a few more obscure ones.

Attributes

custGeom

attributecustGeomCT_CustomGeometry2D | None
= ZeroOrOne('a:custGeom', successors=(_tag_seq[2:]))

cx

attributecx

Shape width as an instance of Emu, or None if not present.

cy

attributecy

Shape height as an instance of Emu, or None if not present.

effectLst

attributeeffectLst
= ZeroOrOne('a:effectLst', successors=(_tag_seq[11:]))

eg_fillProperties

attributeeg_fillProperties
= ZeroOrOneChoice((Choice('a:noFill'), Choice('a:solidFill'), Choice('a:gradFill'), Choice('a:blipFill'), Choice('a:pattFill'), Choice('a:grpFill')), successors=(_tag_seq[9:]))

get_or_add_ln

attributeget_or_add_lnCallable[[], CT_LineProperties]

get_or_add_xfrm

attributeget_or_add_xfrmCallable[[], CT_Transform2D]

ln

attributelnCT_LineProperties | None
= ZeroOrOne('a:ln', successors=(_tag_seq[10:]))

prstGeom

attributeprstGeomCT_PresetGeometry2D | None
= ZeroOrOne('a:prstGeom', successors=(_tag_seq[3:]))

x

attributexLength | None

Distance between the left edge of the slide and left edge of the shape.

0 if not present.

xfrm

attributexfrmCT_Transform2D | None
= ZeroOrOne('a:xfrm', successors=(_tag_seq[1:]))

xml

attributexmlstr

XML string for this element, suitable for testing purposes.

Pretty printed for readability and without an XML declaration at the top.

y

attributey

The offset of the top of the shape from the top of the slide, as an instance of Emu. None if not present.

Functions

first_child_found_in

funcfirst_child_found_in(*tagnames: str) -> _Element | None

First child with tag in tagnames, or None if not found.

paramtagnamesstr
= ()

Returns

lxml.etree._Element | None

insert_element_before

funcinsert_element_before(elm: ElementBase, *tagnames: str)
paramelmElementBase
paramtagnamesstr
= ()

remove_all

funcremove_all(*tagnames: str) -> None

Remove child elements with tagname (e.g. "a:p") in tagnames.

paramtagnamesstr
= ()

Returns

None

xpath

funcxpath(xpath_str: str) -> Any

Override of lxml _Element.xpath() method.

Provides standard Open XML namespace mapping (nsmap) in centralized location.

paramxpath_strstr

Returns

typing.Any

On this page