示例#1
0
文件: vi.c 项目: passedaway/misc
static void sc_put_char(int c)
{
	sc_xy(gs.x,gs.y);
	printf("%c",c);
	fflush(stdout);
	gs.x++;
}
示例#2
0
文件: vi.c 项目: passedaway/misc
static void sc_draw_char(int x, int y, int c)
{
	sc_xy(x,y);
	printf("%c", c);
	fflush(stdout);
	gs.x++;
}
示例#3
0
void print_to_screen(xy_t pos, double scale, col_t colour, double intensity, const int32_t mode, const char *format, ...)
{
	va_list args;
	char string[4096];
	
	va_start (args, format);
	//vsnprintf (string, LOGLINEMAX, format, args);		// print new text to a
	vsprintf (string, format, args);		// print new text to a
	va_end (args);

	draw_string(fb, font, string, sc_xy(pos), scale*zc.scrscale, colour, intensity, drawing_thickness, mode, NULL);
}
示例#4
0
文件: vi.c 项目: passedaway/misc
static void draw_start(void)
{
	int x, y;
	/*  draw '*' range */
	sc_cls();

	for(x = 1; x <= gs.w; x++)
	{
		sc_draw_char(x, 1, '*');
		sc_draw_char(x, gs.h, '*');
	}
	for( y = 1; y <= gs.h; y++)
	{
		sc_draw_char(1, y, '*');
		sc_draw_char(gs.w, y, '*');
	}

	/* center */
	sc_xy(gs.w/2, gs.h/2);
}
示例#5
0
rect_t to_screen_coord_rect(zoom_t zc, rect_t r)
{
	return rect( sc_xy(r.p0) , sc_xy(r.p1) );
}
示例#6
0
文件: vi.c 项目: passedaway/misc
static void sc_right(void)
{
	gs.x++;
	sc_xy(gs.x, gs.y);
}
示例#7
0
文件: vi.c 项目: passedaway/misc
static void sc_left(void)
{
	if( gs.x > 0 )
		gs.x--;
	sc_xy(gs.x, gs.y);
}
示例#8
0
文件: vi.c 项目: passedaway/misc
static void sc_cls(void)
{
	sc_xy(1,1);
	fputs(Ceos, stdout);
	fflush(stdout);
}