home *** CD-ROM | disk | FTP | other *** search
- // ========================================================================
- // moveshape.cs
- //
- // This module contains a function for moving a specified shape.
- // ========================================================================
-
- function MoveShape(%shape, %dist)
- // ----------------------------------------------------
- // moves the %shape by %dist amount
- // ----------------------------------------------------
- {
- echo ("MoveShape: shape id: ", %shape);
- echo ("MoveShape: distance: ", %dist);
- %xfrm = %shape.getTransform();
- %lx = getword(%xfrm,0); // get the current transform values
- %ly = getword(%xfrm,1);
- %lz = getword(%xfrm,2);
- %lx += %dist; // adjust the x axis position
- %shape.setTransform(%lx SPC %ly SPC %lz SPC "0 0 1 0");
- echo ("MoveShape: done.");
- }
-