Exemplo n.º 1
0
Arquivo: main.c Projeto: GottZ/olvfw
int main(void) {
	coord_t		width, height;

    halInit();
    chSysInit();

    /* Initialize and clear the display */
    gdispInit();
    gdispClear(Black);

    // Get the screen size
    width = gdispGetWidth();
    height = gdispGetHeight();

    // Code Here
	gdispDrawCircle(width/2, height/2, 20, Yellow);
    gdispFillCircle (width/4, height/4, 50, Blue);
    gdispFillEllipse (width-100, height-100, 30, 60, Red);
    gdispDrawEllipse (width-100, height-100, 50, 20, Yellow);
    gdispDrawArc(width-width/8, height/8, 30, 10, 70, Gray);
    gdispFillArc(width/8, height/8, 30, 10, 70, Gray);

    while(TRUE) {
        chThdSleepMilliseconds(500);
    }   
}
Exemplo n.º 2
0
Arquivo: gwin.c Projeto: bunnie/uGFX
	void gwinFillEllipse(GHandle gh, coord_t x, coord_t y, coord_t a, coord_t b) {
		if (!((gh->flags & GWIN_FLG_VISIBLE)))
			return;

		#if GDISP_NEED_CLIP
			gdispSetClip(gh->x, gh->y, gh->width, gh->height);
		#endif
		gdispFillEllipse(gh->x+x, gh->y+y, a, b, gh->color);
	}
Exemplo n.º 3
0
/// \method fill_ellipse(x1, y1, a, b, colour)
///
/// Fill a ellipse having a centre point at (x1,y1), lengths a,b, using the given colour.
/// Option to round the ends
///
STATIC mp_obj_t pyb_ugfx_fill_ellipse(mp_uint_t n_args, const mp_obj_t *args) {
    // extract arguments
    //pyb_ugfx_obj_t *self = args[0];
    int x0 = mp_obj_get_int(args[1]);
    int y0 = mp_obj_get_int(args[2]);
	int a = mp_obj_get_int(args[3]);
	int b = mp_obj_get_int(args[4]);
    int col = mp_obj_get_int(args[5]);


	gdispFillEllipse(x0, y0, a, b, col);	

    return mp_const_none;
}
Exemplo n.º 4
0
Arquivo: main.c Projeto: DaviWei/uGFX
int main(void) {
	coord_t		width, height;

    /* Initialize and clear the display */
    gfxInit();

    // Get the screen size
    width = gdispGetWidth();
    height = gdispGetHeight();

    // Code Here
	gdispFillArc(width/2, height/2, width/4, -10, -45, White);
	gdispDrawCircle(width/2+width/8, height/2-height/8, 13, Green);
	gdispFillCircle (width/2+width/8, height/2-height/8, 10, Red);
	gdispDrawArc(width/2+width/8, height/2-height/8, 20, 25, 115, Gray);
	gdispFillEllipse (width-width/6, height-height/6, width/8, height/16, Blue);
	gdispDrawEllipse (width-width/6, height-height/6, width/16, height/8, Yellow);

    while(TRUE) {
    	gfxSleepMilliseconds(500);
    }   
}