From 3013432806a9fd1887cf94ed39898d3ede69d53f Mon Sep 17 00:00:00 2001 From: "richard.lion.heart.gl" Date: Mon, 20 Sep 2010 09:13:44 +0000 Subject: [PATCH] added rtgui_dc_draw_annulus example. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@922 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- examples/gui/demo_view_dc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/gui/demo_view_dc.c b/examples/gui/demo_view_dc.c index 1b54797594..c2b50182ee 100644 --- a/examples/gui/demo_view_dc.c +++ b/examples/gui/demo_view_dc.c @@ -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_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; @@ -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); rect.x1 += 20; rect.x2 += 20 + 50; - rtgui_dc_draw_text(dc, "额外", &rect); + rtgui_dc_draw_text(dc, "extera", &rect); rect.x1 -= 20; rect.x2 -= 20 + 50; rect.y1 += 20;