diff options
| author | bernard.xiong <[email protected]> | 2010-04-11 23:57:21 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-04-11 23:57:21 +0000 |
| commit | 4fd321c36ed4ab05021df2ca461fd795492f7d02 (patch) | |
| tree | 37d23ede05d9e093ed2afbd626f67e879aacd6d0 /rtgui/common/rtgui_theme.c | |
| parent | 553d24f82b5740503b3e2ef5f55590ed1de8aa72 (diff) | |
add rtgui_dc_draw_color_point function.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@606 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'rtgui/common/rtgui_theme.c')
| -rw-r--r-- | rtgui/common/rtgui_theme.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rtgui/common/rtgui_theme.c b/rtgui/common/rtgui_theme.c index 392ab67721..42760cf060 100644 --- a/rtgui/common/rtgui_theme.c +++ b/rtgui/common/rtgui_theme.c @@ -505,7 +505,7 @@ void rtgui_theme_draw_radiobox(struct rtgui_radiobox* radiobox) bord_size = item_size; else { - rtgui_font_get_metrics(rtgui_dc_get_font(dc), "H", &item_rect); + rtgui_font_get_metrics(RTGUI_DC_FONT(dc), "H", &item_rect); bord_size = rtgui_rect_height(item_rect); } @@ -529,7 +529,7 @@ void rtgui_theme_draw_radiobox(struct rtgui_radiobox* radiobox) struct rtgui_rect text_rect; /* draw group text */ - rtgui_font_get_metrics(rtgui_dc_get_font(dc), radiobox->text, &text_rect); + rtgui_font_get_metrics(RTGUI_DC_FONT(dc), radiobox->text, &text_rect); rtgui_rect_moveto(&text_rect, rect.x1 + bord_size + 5, rect.y1); rect.x1 -= 5; rect.x2 += 5; rtgui_dc_fill_rect(dc, &text_rect); @@ -804,8 +804,8 @@ void rtgui_theme_draw_selected(struct rtgui_dc* dc, rtgui_rect_t *rect) rtgui_color_t bc; rt_uint16_t index; - bc = rtgui_dc_get_color(dc); - rtgui_dc_set_color(dc, selected_color); + bc = RTGUI_DC_FC(dc); + RTGUI_DC_FC(dc) = selected_color; rtgui_dc_draw_hline(dc, rect->x1 + 3, rect->x2 - 2, rect->y1 + 1); rtgui_dc_draw_hline(dc, rect->x1 + 3, rect->x2 - 2, rect->y2 - 2); @@ -816,7 +816,7 @@ void rtgui_theme_draw_selected(struct rtgui_dc* dc, rtgui_rect_t *rect) for (index = rect->y1 + 1; index < rect->y2 - 2; index ++) rtgui_dc_draw_hline(dc, rect->x1 + 3, rect->x2 - 2, index); - rtgui_dc_set_color(dc, bc); + RTGUI_DC_FC(dc) = bc; } /* get default background color */ |
