Reciving signal: "EXC_BAD_ACCESS" when attempting to transform TextFrameArt objects.
GDB is reciving signal: "EXC_BAD_ACESS" when I try to transform a TextFrameArt using the TransformArtSuite. Here is an exampke code.
(Note I'still with CS5 SDK.)
AIErr
SetPointTextMatrix( AIArtHandle textArt, AIRealMatrix *matrix)
{
AIErr error = kNoErr;
int textType;
VMGetTextType( textArt, &textType);
if (textType == kPointTextType)
{
/* since we cannot set the matrix directly, we need to calculate a
tranformation and transform the object:
Let C be the <currentMatrix>
Let R be the final <matrix>
Let T be the <transformation> matrix
Since,
R = C * T
then we can calulate
T = inv(C) * R
*/
AIRealMatrix currentMatrix, transformation;
GetPointTextMatrix( textArt, ¤tMatrix);
sMath->AIRealMatrixInvert( ¤tMatrix);
sMath->AIRealMatrixConcat( ¤tMatrix, matrix, &transformation);
/* THIS IS WHERE IT ALL GOES WRONG: - the content of the <transformation> matrix is OK */
error = sTransformArt->TransformArt( textArt, &transformation, 1.0, kTransformObjects));
}
return error;
}
Anyone know why?
