Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pptx/oxml/shapes/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def new_cxnSp(
f" </p:nvCxnSpPr>\n"
f" <p:spPr>\n"
f" <a:xfrm{flip}>\n"
f' <a:off x="{x}" y="{y}"/>\n'
f' <a:ext cx="{cx}" cy="{cy}"/>\n'
f' <a:off x="{int(x)}" y="{int(y)}"/>\n'
f' <a:ext cx="{int(cx)}" cy="{int(cy)}"/>\n'
f" </a:xfrm>\n"
f' <a:prstGeom prst="{prst}">\n'
f" <a:avLst/>\n"
Expand Down
8 changes: 8 additions & 0 deletions tests/shapes/test_shapetree.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,14 @@ def add_cht_gr_frm_fixture(self):
3,
"p:spPr/(a:xfrm{flipH=1,flipV=1}/(a:off{x=2,y=3},a:ext{cx=7,cy=5})",
),
# float EMUs (e.g. shape.height / 2) must become integer XML attrs
(
1.5,
2.5,
3.7,
5.2,
"p:spPr/(a:xfrm/(a:off{x=1,y=2},a:ext{cx=2,cy=2})",
),
]
)
def add_cxnSp_fixture(self, request):
Expand Down