Skip navigation
Currently Being Moderated

Problems with ITextFrame::GetMatrix function

Feb 23, 2012 2:28 AM

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:

 

AIErr

CreatePointText( short paintOrder, AIArtHandle prep,

                 AIRealPoint *textPoint, AIArtHandle *newText)

{

     AIError error;

     error = sAITextFrame->NewPointText( paintOrder, prep,

                                         kHorizontalTextOrientation,

                                         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?

 
Replies
  • Currently Being Moderated
    Feb 23, 2012 6:21 AM   in reply to arenol

    Looks like you should check out the Hard and Soft coordinates functions.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points