4 Replies Latest reply: Feb 24, 2012 1:09 AM by arenol RSS

    Problems with ITextFrame::GetMatrix function


      Can anyone explain the values of the matrix returned from the ITextFrame::GetMatrix() function (wrapper for sTextFrame->GetMatrix()).


      The a,b, c and d values which represent the rotation (and possibly the shear deformation) are OK,


      but I can't relate the tx and ty values to the position of the text object on the artboard.


      As a test I tried the following code:



      CreatePointText( short paintOrder, AIArtHandle prep,

                       AIRealPoint *textPoint, AIArtHandle *newText)


           AIError error;

           error = sAITextFrame->NewPointText( paintOrder, prep,


                                               textPoint, newText);


           TextFrameRef ateTextRef;

           error = sAITextFrame->GetATETextFrame( *newText, &ateTextRef);

           ATE::ITextFrame ateText( ateTextRef);



           AIRealMatrix matrix = (AIRealMatrix) ateText.GetMatrix();



      But the tx and ty values returned in matrix are now both 0.  They should equal textPoint.h and textPoint.v, shouldn't they?