home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 November / PCO_1198.ISO / filesbbs / os2 / tspg202s.arj / TSPG202S.ZIP / Scripts / ROTATE90.CWX < prev    next >
Encoding:
Text File  |  1997-05-04  |  1.1 KB  |  33 lines

  1. /* Duplicate & Rotate the currently selected object 90degrees, 5 at a time 
  2.  
  3.    You MUST have an object selected before running this                   
  4.  
  5.  Copyright 1997 by TrueSpectra Inc.                                  
  6.                                                                      
  7.  This code is provided purely for demonstration purposes and is not  
  8.  supported or under warranty.  Feel free to modify and examine this  
  9.  example script for your own purposes.                               
  10.  
  11. */
  12.  
  13. /* rotate by 5 degrees to 90 = 18 times */
  14. Do count = 1 to 18
  15.  
  16.   /* what is selected? */
  17.   object = CwGetSelectedObject()
  18.  
  19.   /* duplicate the object */
  20.   newobject = CwDuplicateObject(object)
  21.  
  22.   /* where is the selected object currently */
  23.   call CwGetPosition newobject, position
  24.  
  25.   /* calculate the new angle */
  26.   rotate = position.Rotation + (5 * count)
  27.  
  28.   /* rotate the new object */
  29.   call CwSetPosition newobject, position.x, position.y, position.width,,
  30.                                 position.height, rotate, position.XShear
  31.  
  32. end
  33.