Пример #1
0
Файл: box.c Проект: paud/d2x-xl
void GrUBox(int left,int top,int right,int bot)
{
	if (TYPE==BM_LINEAR)
		gr_ubox0( left, top, right, bot );

#ifdef __DJGPP__
	else if ( TYPE == BM_MODEX )
		gr_ubox12( left, top, right, bot );
#endif

    else
		gr_ubox12( left, top, right, bot );
}
Пример #2
0
void gr_ubox(int left,int top,int right,int bot, const uint8_t color)
{
	if (TYPE==bm_mode::linear)
		gr_ubox0(*grd_curcanv, left, top, right, bot, color);
    else
		gr_ubox12(*grd_curcanv, left, top, right, bot, color);
}
Пример #3
0
void gr_box(int left,int top,int right,int bot)
{
	if (TYPE==BM_LINEAR)
		gr_box0( left, top, right, bot );
	else
		gr_ubox12( left, top, right, bot );
}
Пример #4
0
Файл: box.c Проект: paud/d2x-xl
void gr_box12(int left,int top,int right,int bot)
{
if (top > MAXY ) return;
if (bot < MINY ) return;
if (left > MAXX ) return;
if (right < MINX ) return;
if (top < MINY) top = MINY;
if (bot > MAXY ) bot = MAXY;
if (left < MINX) left = MINX;
if (right > MAXX ) right = MAXX;
gr_ubox12(left, top, right, bot );
    
}
Пример #5
0
static void gr_box12(grs_canvas &canvas, const uint_fast32_t left, const uint_fast32_t top, uint_fast32_t right, uint_fast32_t bot, const uint8_t color)
{
	const auto maxy = canvas.cv_bitmap.bm_h - 1;
	if (top > maxy)
		return;
	const auto maxx = canvas.cv_bitmap.bm_w - 1;
	if (left > maxx)
		return;
	if (bot > maxy)
		bot = maxy;
	if (right > maxx)
		right = maxx;
	gr_ubox12(canvas, left, top, right, bot, color);
}