Beispiel #1
0
void draw_circle(ucg_t *ucg)
{
    prepare_picture(ucg);
    hrule(ucg, ox+50+1, 30, 20, 0);
    vrule(ucg, ox+50+20-1, 30+1, 20, 1);
    ucg_SetColor(ucg, 0, 255, 255, 255);

    ucg_DrawCircle(ucg, ox+50, 30, 20, UCG_DRAW_LOWER_RIGHT);
    pos(ucg, ox+50, 30,0);
    save_picture(ucg, "draw_circle");
}
Beispiel #2
0
// Lua: ucg.drawCircle( self, x0, y0, rad, option )
static int lucg_drawCircle( lua_State *L )
{
    lucg_userdata_t *lud;

    if ((lud = get_lud( L )) == NULL)
        return 0;

    ucg_int_t args[4];
    lucg_get_int_args( L, 2, 4, args );

    ucg_DrawCircle( LUCG, args[0], args[1], args[2], args[3] );

    return 0;
}