In Powerpoint 2007, how can I position a Callout's Tail programatically?
Posted
by Rorschach
on Stack Overflow
See other posts from Stack Overflow
or by Rorschach
Published on 2009-12-01T21:21:04Z
Indexed on
2010/03/16
22:41 UTC
Read the original article
Hit count: 255
I'm looking at the XML and this is what it has for the Callout object's coordinates and geometry:
<p:spPr>
<a:xfrm>
<a:off x="2819400" y="5181600"/> // X,Y Position of Callout Box
<a:ext cx="609600" cy="457200"/> // Width,Height of Callout Box
</a:xfrm>
<a:prstGeom prst="wedgeRectCallout">
<a:avLst>
<a:gd name="adj1" fmla="val 257853"/> // X Position Of Tail
<a:gd name="adj2" fmla="val -532360"/> // Y Position of Tail
</a:avLst>
</a:prstGeom>
<a:solidFill>
<a:schemeClr val="accent1">
<a:alpha val="50000"/>
</a:schemeClr>
</a:solidFill>
</p:spPr>
What I'm having trouble with is the formula for telling it to place the tail at a particular coordinate on the slide. I've tried this to calculate it, but it does not work correctly.
//This gives me the distance between the Coordinate and the Center of the Callout.
DistanceX = Coordinate.X - (Callout.X + Callout.X_Ext)/2
DistanceY = Coordinate.Y - (Callout.Y + Callout.Y_Ext)/2
But, the geometric value is not the distance between the two points.
Anybody know what the formula is for calculating this?
© Stack Overflow or respective owner