home *** CD-ROM | disk | FTP | other *** search
- /* Copyright 1994-1995 H.Ogasawara(COR.) */
-
- #include <sys_doslib.h>
- #include <corlib.h>
- #include <HS_wlib.h>
-
- #define GH 512
- #define GV 512
-
- GposSetFill2( wp, dp, c1, c2, x1, y1, x2, y2 )
- WindowID wp;
- DrawBuf *dp;
- {
- int mode= WindowGetGraphicMode();
- if( mode != WindowAttrGraphic16 ){
- int ax, ay, rx, ry, rx2, ry2, sx, sy;
- int gv= 512;
- if( mode == WindowAttrGraphic256 )
- gv= 1024;
- WindowGetScreenPosition( wp, &sx, &sy );
- WindowGetGraphicOffset( &ax, &ay );
- rx= sx+ x1;
- ry= sy+ y1;
- rx2= sx+ x2+1;
- ry2= sy+ y2+1;
- if( !(ax <= rx && ax+GH >= rx2 && ay <= ry && ay+gv >= ry2) ){
- int x, y, xx2, yy2;
- x= ax > rx ? ax-sx : x1;
- y= ay > ry ? ay-sy : y1;
- xx2= ax+GH > rx2 ? x2+1 : ax+GH-sx;
- yy2= ay+gv > ry2 ? y2+1 : ay+gv-sy;
- if( x < xx2 && y < yy2 ){
- DrawSetLine( dp, x1, y1, x2, y2, c2,
- OptionFill );
- DrawSetLine( dp+1, x, y, xx2-1, yy2-1, c1,
- OptionFill );
- return 2;
- }
- DrawSetLine( dp, x1, y1, x2, y2, c2, OptionFill );
- return 1;
- }
- }
- DrawSetLine( dp, x1, y1, x2, y2, c1, OptionFill );
- return 1;
- }
-
-