Little mushroom
Little mushroom

Reputation: 29

How to calculate the position and size of a shape in OpenXML to display in WPF like the same in PPTx

I have a simple shape in PPTx

and I saw and got Its position in Openxml

 <a:xfrm>
 <a:off x="1447800" y="1066800" />
  <a:ext cx="3886200" cy="990600" />
</a:xfrm> 

I got out this values

but I don't known how to get with, height, and coordinate (left, top) of shape in Open xml to show in wpf with the same with, height and position.

Upvotes: 3

Views: 2114

Answers (1)

Todd Main
Todd Main

Reputation: 29153

Divide those values by 12700 for point values (what WPF uses). So it would be:

  • x = 114 (a:off@x = 1447800/12700)
  • y = 84 (a:off@y = 1066800/12700)
  • width = 306 (a:ext@cx = 3886200/12700)
  • height = 78 (a:ext@cy = 990600/12700)

Upvotes: 5

Related Questions