added rtgui_dc_draw_annulus example.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@922 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
richard.lion.heart.gl 2010-09-20 09:13:44 +00:00
parent d918c69567
commit 3013432806
1 changed files with 5 additions and 1 deletions

View File

@ -92,6 +92,10 @@ rt_bool_t dc_event_handler(rtgui_widget_t* widget, rtgui_event_t *event)
/* 画一个圆弧 */ /* 画一个圆弧 */
RTGUI_DC_FC(dc) = RTGUI_RGB(250, 120, 120); RTGUI_DC_FC(dc) = RTGUI_RGB(250, 120, 120);
rtgui_dc_draw_arc(dc, rect.x1 + 120, rect.y1 + 60, 30, 0, 120); rtgui_dc_draw_arc(dc, rect.x1 + 120, rect.y1 + 60, 30, 0, 120);
/* 画一个扇形圆环 */
RTGUI_DC_FC(dc) = RTGUI_RGB(150, 23, 100);
rtgui_dc_draw_annulus(dc, 180, 170, 30, 50, 210, 330);
/* 多边形 */ /* 多边形 */
RTGUI_DC_FC(dc) = blue; RTGUI_DC_FC(dc) = blue;
@ -150,7 +154,7 @@ rt_bool_t dc_event_handler(rtgui_widget_t* widget, rtgui_event_t *event)
rtgui_dc_draw_border(dc, &rect, RTGUI_BORDER_EXTRA); rtgui_dc_draw_border(dc, &rect, RTGUI_BORDER_EXTRA);
rect.x1 += 20; rect.x1 += 20;
rect.x2 += 20 + 50; rect.x2 += 20 + 50;
rtgui_dc_draw_text(dc, "¶îÍâ", &rect); rtgui_dc_draw_text(dc, "extera", &rect);
rect.x1 -= 20; rect.x1 -= 20;
rect.x2 -= 20 + 50; rect.x2 -= 20 + 50;
rect.y1 += 20; rect.y1 += 20;