This library contains functions to animate moving (expanding or contracting) rectangles. The following routines are available for this purpse:
• xgrf_2box  Animation of moving rectangles 
• xgrf_stepcalc  Parameter calculation for rectangle animation 
Note: These functions should be seen primarily as replacements for the functions graf_growbox and graf_shrinkbox, that in PCGEM were a casualty of the legal dispute between Apple and Digital Research.
See also: graf_growbox graf_shrinkbox Style guidelines
Name:  »Animate rectangles«  Draw a set of moving rectangles.  
Opcode:  131  
Syntax:  int16_t xgrf_2box ( int16_t cx, int16_t cy, int16_t w, int16_t h, int16_t corners, int16_t cnt, int16_t xstep, int16_t ystep, int16_t doubled );  
Description:  The call xgrf_2box draws a set of rectangles that move on the
screen. The following apply:
Note: The function is a replacement for the deleted functions of the FORM and GRAF libraries in PCGEM (due to the legal dispute between Apple and Digital Research).  
Return value:  This is unknown at present.  
Availability:  The function is available only as of PCGEM 2.0, as of KAOS 1.4.2 and MagiC.  
Group:  Extended graphics library  
See also:  Binding xgrf_stepcalc MagiC 
C:  int16_t xgrf_2box ( int16_t cx, int16_t cy, int16_t w, int16_t h, int16_t corners, int16_t cnt, int16_t xstep, int16_t ystep, int16_t doubled );  
Binding:  int16_t xgrf_2box ( int16_t cx, int16_t cy, int16_t w, int16_t h, int16_t corners, int16_t cnt, int16_t xstep, int16_t ystep, int16_t doubled ) { int_in[0] = cnt; int_in[1] = xstep; int_in[2] = ystep; int_in[3] = doubled; int_in[4] = corners; int_in[5] = cx; int_in[6] = cy; int_in[7] = w; int_in[8] = h; return ( crys_if(131) ); }  
GEMArrays: 

Name:  »Stepcalc for XGraf«  Parameter calculation for the animation of rectangles.  
Opcode:  130  
Syntax:  int16_t xgrf_stepcalc ( int16_t orgw, int16_t orgh, int16_t xc, int16_t yc, int16_t w, int16_t h, int16_t *pcx, int16_t *pcy, int16_t *pcnt, int16_t *pxstep, int16_t *pystep );  
Description:  The call xgrf_stepcalc calculates all parameters for a call of
xgrf_2box. The following apply:
Note: The centred position, number of steps as well as step size are calculated from the starting size, final size and the end positions of the rectangle.  
Return value:  This is unknown at present.  
Availability:  The function is available only as of PCGEM 2.0, as of KAOS 1.4.2 and MagiC.  
Group:  Extended graphics library  
See also:  Binding xgrf_2box MagiC 
C:  int16_t xgrf_stepcalc ( int16_t orgw, int16_t orgh, int16_t xc, int16_t yc, int16_t w, int16_t h, int16_t *pcx, int16_t *pcy, int16_t *pcnt, int16_t *pxstep, int16_t *pystep );  
Binding:  int16_t xgrf_stepcalc ( int16_t orgw, int16_t orgh, int16_t xc, int16_t yc, int16_t w, int16_t h, int16_t *pcx, int16_t *pcy, int16_t *pcnt, int16_t *pxstep, int16_t *pystep ) { int_in[0] = orgw; int_in[1] = orgh; int_in[2] = xc; int_in[3] = yc; int_in[4] = w; int_in[5] = h; crys_if (130); *pcx = int_out[1]; *pcy = int_out[2]; *pcnt = int_out[3]; *pxstep = int_out[4]; *pystep = int_out[5]; return ( int_out[0] ); }  
GEMArrays: 
