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 >
Wrap
OS/2 REXX Batch file
|
1992-08-05
|
1KB
|
48 lines
;distort -- demonstrates geometric operations using general TIM routines
;expects: image in a, LUTs initialized by '*ini*
;*********************************
#include timdefs.h
parms
int windis
endparms
float fx1 = 99.0
float fy1 = 11.0
float fx2 = 222.0
float fy2 = 22.0
float xstep = 1.0001
float ystep = 1.1
ibuf er
era x
cls
dest q
show q
cstr a
era 1
*windispl h (windis+WINLUT1)
dest p
copy q s
lut 2 3
int lno = 0
drln q fy1 fx1 fy2 fx2 red
while lno < 158
rdln s fy1 fx1 fy2 fx2 ;get pixels along line
bgm q red fy1 fx1 ;write single dot into q
bgm q red fy2 fx2
drln r fy1 fx1 fy2 fx2 red ;draw line in other image for control
ihis p lno ;write into p (in line)
fy1 += ystep
fy2 += ystep
xstep *= 1.005
fx1 = fx1 + 1 - xstep
fx2 = fx2 + 1 - xstep
lno += 1
endw
drln q fy1 fx1 fy2 fx2 red
dest q
*windispl h (windis+WINLUT3+BITCOPY1)
dest p
*windispl i windis
stop