MCPcopy Index your code
hub / github.com/python-openxml/python-docx / CT_ShapeProperties

Class CT_ShapeProperties

src/docx/oxml/shape.py:222–263  ·  view source on GitHub ↗

`` `` element, specifies size and shape of picture container.

Source from the content-addressed store, hash-verified

220
221
222class CT_ShapeProperties(BaseOxmlElement):
223 """``<pic:spPr>`` element, specifies size and shape of picture container."""
224
225 xfrm = ZeroOrOne(
226 "a:xfrm",
227 successors=(
228 "a:custGeom",
229 "a:prstGeom",
230 "a:ln",
231 "a:effectLst",
232 "a:effectDag",
233 "a:scene3d",
234 "a:sp3d",
235 "a:extLst",
236 ),
237 )
238
239 @property
240 def cx(self):
241 """Shape width as an instance of Emu, or None if not present."""
242 xfrm = self.xfrm
243 if xfrm is None:
244 return None
245 return xfrm.cx
246
247 @cx.setter
248 def cx(self, value):
249 xfrm = self.get_or_add_xfrm()
250 xfrm.cx = value
251
252 @property
253 def cy(self):
254 """Shape height as an instance of Emu, or None if not present."""
255 xfrm = self.xfrm
256 if xfrm is None:
257 return None
258 return xfrm.cy
259
260 @cy.setter
261 def cy(self, value):
262 xfrm = self.get_or_add_xfrm()
263 xfrm.cy = value
264
265
266class CT_StretchInfoProperties(BaseOxmlElement):

Callers

nothing calls this directly

Calls 1

ZeroOrOneClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…