コード例 #1
0
ファイル: ui.c プロジェクト: draziw-/uTox
static void background_draw(PANEL *UNUSED(p), int UNUSED(x), int UNUSED(y), int width, int height)
{
    drawrect(0, 0, LIST_RIGHT, LIST_Y - 1, LIST_DARK);
    drawhline(0, LIST_Y - 1, LIST_RIGHT, LIST_EDGE);
    drawrect(0, LIST_Y, LIST_RIGHT, height + LIST_BOTTOM, LIST_MAIN);
    drawrect(0, height + LIST_BOTTOM, LIST_RIGHT, height, LIST_DARK);

    drawself();

    drawrect(LIST_RIGHT, 0, width, height, WHITE);

    drawvline(LIST_RIGHT, 1, LIST_Y - 1, LIST_EDGE3);
    drawpixel(LIST_RIGHT, LIST_Y - 1, LIST_EDGE2);
    drawvline(LIST_RIGHT, LIST_Y, height - SCALE * 15, LIST_EDGE4);
    drawpixel(LIST_RIGHT, height - SCALE * 15, LIST_EDGE5);

    drawhline(LIST_RIGHT + 1, LIST_Y - 1, width, C_GRAY);
}
コード例 #2
0
ファイル: fdw32_24.c プロジェクト: ev3dev/grx
static void w32_drawhline(int x, int y, int w, GrxColor color)
{
    RECT Rect;

    GRX_ENTER();
    drawhline(x, y, w, color);
    Rect.left = x;
    Rect.top = y;
    Rect.right = x + w;
    Rect.bottom = y + 1;
    InvalidateRect(hGRXWnd, &Rect, FALSE);
    GRX_LEAVE();
}
コード例 #3
0
ファイル: shell.c プロジェクト: sarthakparui/opos
 /* Loads or reloads the shell */
 void osh_init()
 {	
	osh_x = 1	, 
	osh_y = 3	;

	osh_cmd_buff[0] = 0;

	/* Clear screen 	  */
	clear(color(BLACK,WHITE));
	
	/* print the header 	  */
	print(osh_header_message,1,1);
	drawhline(1,2,78,color(BLACK,YELLOW));

	/* set shell color attrib */
	setattrib(color(osh_bg,osh_fg));

	/* Initialize the parser  */
	osh_cmd_parser_buff[0] = 0;

 }
コード例 #4
0
ファイル: text.c プロジェクト: digideskio/uTox
static void drawtextmark(int x, int y, char_t *str, uint16_t length, int d, int h, int hlen, uint16_t lineheight)
{
    h -= d;
    if(h + hlen < 0 || h > length || hlen == 0) {
        return;
    }

    if(h < 0) {
        hlen += h;
        h = 0;
        if(hlen < 0) {
            hlen = 0;
        }
    }

    if(h + hlen > length) {
        hlen = length - h;
    }

    int width = textwidth(str, h);

    int w = textwidth(str + h, hlen);
    drawhline(x + width, y + lineheight - 1, x + width + w, COLOR_MAIN_TEXT);
}
コード例 #5
0
ファイル: PixelBuffer.cpp プロジェクト: Ghirigoro/Coment
		void PixelBuffer::draw2lines(int colour, int cx, int cy, int x, int y)
		{
			drawhline(colour, cx - x, cx + x, cy + y);
			if (x != 0 && y != 0)
				drawhline(colour, cx - x, cx + x, cy - y);
		}