home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Kyūkyoku!! X68000 Emulator
/
X68000Book.dat
/
mac
/
OLS
/
X68000
/
Ko-Window
/
kow142s.lzh
/
corlib
/
GposSetClear.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-25
|
930b
|
40 lines
/* Copyright 1994-1995 H.Ogasawara(COR.) */
#include <sys_doslib.h>
#include <corlib.h>
#include <HS_wlib.h>
#define GH 512
#define GV 512
GposSetClear( wp, dp, c1, c2 )
WindowID wp;
DrawBuf *dp;
{
if( WindowGetGraphicMode() != WindowAttrGraphic16 ){
int ax, ay, rx, ry, rx2, ry2;
WindowGetScreenPosition( wp, &rx, &ry );
WindowGetGraphicOffset( &ax, &ay );
rx2= rx+HS_WindowGetViewSizeX(wp);
ry2= ry+HS_WindowGetViewSizeY(wp);
if( !(ax <= rx && ax+GH >= rx2 && ay <= ry && ay+GV >= ry2) ){
int x, y, x2, y2;
x= ax > rx ? ax-rx : 0;
y= ay > ry ? ay-ry : 0;
x2= ax+GH > rx2 ? rx2-rx : ax+GH-rx;
y2= ay+GH > ry2 ? ry2-ry : ay+GH-ry;
if( x < x2 && y < y2 ){
DrawSetClear( dp, c2 );
DrawSetLine( dp+1, x, y, x2-1, y2-1, c1,
OptionFill );
return 2;
}
DrawSetClear( dp, c2 );
return 1;
}
}
DrawSetClear( dp, c1 );
return 1;
}