(Citect Version: v188.8.131.526)
Why does this function return the position of the bottom left corner of the animation object relative to the top left corner of the window?
There is nothing in the manual stating that this is how the function works.
Shouldn't this function return the top left corner of the animation object?
The animation point is just a point so it has no top or bottom.
If an object or genie is being displayed at that point then obviously it does have a top and bottom but this can be offset anywhere from the animation point itself. For example, when you create a genie the animation point for it can be positioned top-left, bottom left or 143 pixels away.
You would have to look at the object itself to see where the animation point is positioned.
Additional to Richard's comments, the DspAnGetPos() function returns the X and Y position of the animation point in question, relative to the top-left corner of the window (remember multiple screens can be present).
Every object on a Citect page has an Animation Point and some objects can have many depending upon whether multiple objects have been grouped into a single object etc.. This function is one of the few functions within Citect that returns both X and Y positions at the same time.
FUNCTION AnXYPos(INT hAn)
DspAnGetPos(hAn, iXpos, iYpos);
When the function is run iXpos & iYpos will contain the X, Y coordinates to the AN passed