2 Replies Latest reply on Dec 8, 2009 11:11 PM by MageshR


    MageshR Level 1

      Hi - I need some help on how to use the move() function. I ve placed my image in the graphic frame and I want to move it by some value (x,y). I found that move() function can help me with that, but am able to find a correct usage for it.

      void move(OptVariableType to,           OptUnitArray2 by)


      I'm setting OptVariableType optVar = new OptVariableType(false,null); since I want to do a relative move and not move to a absolute position. But I'm not sure how to use/set the other variable OptUnitArray2.


      Can someone guide me on how to use that variable to set a relative(x,y) by which my image must move? Its kind of urgent. Pls guide me.


      Thanks & Regards,


        • 1. Re: Graphic.Move()

          Based on the names, I'm guessing you are using the Java API?


          Try something like :


          move(OptArg.noVariableType(), OptArg.makeUnitArray2(UnitUtils.createDouble(new double[] {10.0, 20.0})));

          • 2. Re: Graphic.Move()
            MageshR Level 1

            Hi thanks for your reply. It looks like mygraphic.move is actualy moving the graphic frame but I want to just

            translate the position of the image in this graphic frame. I tried


                                                        double moveByX = 1.0;
                                                            double moveByY = 1.0;
                                                            myGraphic.move(OptArg.noVariableType(), OptArg.makeUnitArray2(UnitUtils.createDouble(new double[] {moveByX, moveByY})));


            where myGraphic is of type Graphic.


            Can you pls guide me on how to move the image in the graphic frame and not the actual graphic frame as such?