Get absolute coordinates a child shape RRS feed

  • Question

  • Sorry for my English.

    A PowerPoint slide contains a group shape (grpSp) with following coordinates:

    <a:off y="2058985" x="244799"/>
    <a:ext cy="2264343" cx="7118946"/>
    <a:chOff y="2058986" x="244799"/>
    <a:chExt cy="1942187" cx="5727249"/>

    This group shape contains a child shape (sp) with following coordinates:

    <a:off y="3084512" x="244799"/>
    <a:ext cy="916661" cx="1710237"/>

    After ungrouping the child shape contains follow coordinates:

    <a:off y="2058986" x="244799"/>
    <a:ext cy="1064224" cx="2545581"/>

    As you can see coordinates are changed - converting to absolute coordinate on the slide.

    I cannot programmatically to make the formula to get these absolutely coordinates. Which formula should I use to convert a child shape's coordinates to absolute as shown in the example (cx="1710237" => "2545581")?

    Friday, June 8, 2018 9:50 PM


  • Hello adamShakhabov,

    As far as I know, <a:ext>:cx is the  width of the shape and <a:off>:x is the x-coordinates of the shape. It should not change if we does not change the size of the shape.

    And I also failed to reproduce your issue based on current description.

    I group two shapes to a group. Then I checked their <x:xfrm>.

    The group is 

    <a:off x="2325950" y="896645" />
    <a:ext cx="1518081" cy="2201662" />
    <a:chOff x="2325950" y="896645" />
    <a:chExt cx="1518081" cy="2201662" />

    One of child shape is 

    <a:off x="2325950" y="896645" />
    <a:ext cx="1518081" cy="816745" />

    After ungrouping without anythings else to do, the<x:xfrm> for the shape is 

    <a:off x="2325950" y="896645" />
    <a:ext cx="1518081" cy="816745" />

    Every thing does not change.

    And after moving the shape location, the <x:xfrm> for the shape now is

    <a:off x="754603" y="2059619" />
    <a:ext cx="1518081" cy="816745" />

    We can see that <a:off> changed and <a:ext> all remains same since the size does not changed.

    I would suggest you details your operation and share a presentation file in case of any misunderstanding,

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, June 11, 2018 3:22 AM