Skip navigation
Currently Being Moderated

How to move the art in same document?

Apr 20, 2011 12:37 AM

hi,

 

Is there any function in sdk which can move our art(AIArtHandle) from one place to other specific place in same document?

plz give me any suggestion or way  to do so.

 

thanks

 
Replies
  • Currently Being Moderated
    Apr 20, 2011 1:44 AM   in reply to DeepAlone

    Hi,

     

    When I have a Bezier curve (MyArt) and I want to move (translate) this curve, I use something like this

     

    AIErr error=kNoErr;

    AIRealMatrix Matrix;

    AIArtHandle MyArt;

    AIRealPoint MyTranslation;

     

    //Horizontal and vertical values for the translation.

    MyTranslation.h=100;

    MyTranlation.v=50;

    //Create the  matrix using AIRealMatrixSetTranslate from AIRealMath.h.

    sMath->AIRealMatrixSetTranslate(&Msatrix, MyTranslation.h, MyTranslation.v);

    //Apply MyTranslation to MyArt to move MyArt. TransformArt is from AITransformArt.h.

    error=sAITransformArt->TransformArt(MyArt, &Matrix, 0, kTransformObjects);

     

    With AIRealMath.h, it's possible to use rotations and scales.

     

    Good luck,

     

    JLG.

     
    |
    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