home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / timwin.zip / TIMWIN2.EXE / pak / DISTORT.CMD < prev    next >
OS/2 REXX Batch file  |  1992-08-05  |  1KB  |  48 lines

  1. ;distort  --  demonstrates geometric operations using general TIM routines
  2. ;expects:     image in a, LUTs initialized by '*ini*
  3. ;*********************************
  4. #include timdefs.h
  5.  
  6. parms
  7.   int windis
  8. endparms
  9. float fx1 = 99.0
  10. float fy1 = 11.0
  11. float fx2 = 222.0
  12. float fy2 = 22.0
  13. float xstep = 1.0001
  14. float ystep = 1.1
  15. ibuf er
  16. era x
  17. cls
  18. dest q
  19. show q
  20. cstr a 
  21. era 1
  22. *windispl h (windis+WINLUT1)
  23. dest p
  24. copy q s
  25. lut 2 3
  26. int lno = 0
  27. drln q fy1 fx1 fy2 fx2 red
  28. while lno < 158
  29.   rdln s fy1 fx1 fy2 fx2        ;get pixels along line
  30.   bgm q red fy1 fx1                ;write single dot into q
  31.   bgm q red fy2 fx2
  32.   drln r fy1 fx1 fy2 fx2 red       ;draw line in other image for control
  33.   ihis p lno                     ;write into p (in line)
  34.   fy1 += ystep
  35.   fy2 += ystep
  36.   xstep *= 1.005
  37.   fx1 = fx1 + 1 - xstep
  38.   fx2 = fx2 + 1 - xstep
  39.   lno += 1
  40. endw
  41. drln q fy1 fx1 fy2 fx2 red
  42. dest q
  43. *windispl h (windis+WINLUT3+BITCOPY1)
  44. dest p
  45. *windispl i windis
  46. stop
  47. 
  48.