Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
80821members
346893posts

Citect Cicode Function DspAnGetPos

bprobertson
Ensign
Ensign
0 Likes
2
1332

Citect Cicode Function DspAnGetPos

Hi,

 

(Citect Version: v8.10.0.2086)

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?

 

2 Replies 2
Richard
Lieutenant Lieutenant
Lieutenant
0 Likes
0
1279

Re: Citect Cicode Function DspAnGetPos

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.

 

 

 

RobertSanders
Lieutenant Lieutenant
Lieutenant
0 Likes
0
1276

Re: Citect Cicode Function DspAnGetPos

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.

 

Example:

 

FUNCTION AnXYPos(INT hAn)
INT iXPos;
INT iYpos;

DspAnGetPos(hAn, iXpos, iYpos);

 

When the function is run iXpos & iYpos will contain the X, Y coordinates to the AN passed 

 

Regards

 

Rob