/************************************************************************** * * AESFAST PD utilties. * * Rectangle utilities 4... * rc_gtov * rc_vtog *************************************************************************/ #include /*------------------------------------------------------------------------- * rc_gtov - Convert GRECT to VRECT. *-----------------------------------------------------------------------*/ void rc_gtov(pgrect, pvrect) register GRECT *pgrect; register VRECT *pvrect; { pvrect->v_x1 = pgrect->g_x; pvrect->v_y1 = pgrect->g_y; pvrect->v_x2 = pgrect->g_x + pgrect->g_w; pvrect->v_y2 = pgrect->g_y + pgrect->g_h; } /*------------------------------------------------------------------------- * rc_vtog - Convert VRECT to GRECT. *-----------------------------------------------------------------------*/ void rc_vtog(pvrect, pgrect) register VRECT *pvrect; register GRECT *pgrect; { pgrect->g_x = pvrect->v_x1; pgrect->g_y = pvrect->v_y1; pgrect->g_w = pvrect->v_x2 - pvrect->v_x1; pgrect->g_h = pvrect->v_y2 - pvrect->v_y1; }