(x11,x12,x20,x21,x22) ;------------------------------------------------------------ ; face.spi ; PURPOSE: called by makefaces.spi, to create test images for "CA S" ; INPUT: ; x11,x12 : width, height of image ; x20 : head shape 0 = round, 1 = oval ; x21 : eyes 0 = left, 1 = right, 2 = center ; x22 : mouth 0 = small, 1 = large ;----------------------------------------------------------- x64 = 64 ; Original size ;------- OUTPUT FILES ------------ FR ?output image?[face] ; Name the file ;-------- END BATCH HEADER--------------- x66 = INT(x11/2 + 1) ; Center coordinates x67 = INT(x12/2 + 1) x68 = INT(x11 * 20/x64) ; Radius ; ----- the eyes ----- x72 = INT(x11 * 24/x64) ; Coords for left eyehole x73 = INT(x11 * 28/x64) x82 = INT(x11 * 42.0/x64) ; Coords for right eyehole x83 = x73 x75 = INT(x11 * 5.0/x64) ; Radius of eyehole IF (x21.EQ.0) THEN ; Eyes left x76 = INT(x11 * 21/x64) ; pupil x coords x78 = INT(x11 * 39/x64) ENDIF IF (x21.EQ.1) THEN ; eyes right x76 = INT(x11 * 27/x64) ; pupil x coords x78 = INT(x11 * 45/x64) ENDIF x77 = INT(x11 * 29/x64) ; pupil y coord x79 = INT(x11 * 3/x64) ; pupil radius ; ----- the mouth ----- IF (x22.EQ.0) THEN ; small mouth x52 = INT(x11 * 30/x64) x53 = INT(x11 * 41/x64) ; upper left coords x54 = INT(x11 * 5/x64) x55 = INT(x11 * 5/x64) ; x & y offsets ENDIF IF (x22.EQ.1) THEN ; large mouth x52 = INT(x11 * 24/x64) x53 = INT(x11 * 41/x64) ; upper left coords x54 = INT(x11 * 17/x64) x55 = INT(x11 * 5/x64) ; x & y offsets ENDIF DE [face] PT ; make the round head [face] x11,x12 ; dimensions C x66,x67 ; center coords x68 ; radius N IF (x20.eq.1) THEN ; for oval head IP [face] _2 (INT(x11*55/x64),x11) PD _2 [face] (x11,x11) M (INT(x11*5/x64),1) ENDIF ; Then do the eyes and mouth PT [face] CS ; left eye x72,x73 x75 Y C x76,x77 x79 Y CS ; right eye x82,x83 x75 Y C x78,x77 x79 Y RS ; mouth x52,x53 x54,x55 N RE