mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-27 17:40:22 +00:00
update DC example.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@788 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -9,6 +9,12 @@
|
||||
#include <rtgui/rtgui_system.h>
|
||||
#include <rtgui/widgets/label.h>
|
||||
#include <rtgui/widgets/slider.h>
|
||||
#include <rtgui/image_hdc.h>
|
||||
|
||||
#include "play.hdh"
|
||||
#include "stop.hdh"
|
||||
struct rtgui_image_hdcmm play_image = RTGUI_IMAGE_HDC_DEF(2, 0x1c, 0x16, play_hdh);
|
||||
struct rtgui_image_hdcmm stop_image = RTGUI_IMAGE_HDC_DEF(2, 0x1c, 0x16, stop_hdh);
|
||||
|
||||
/*
|
||||
* view<65><77><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -50,6 +56,16 @@ rt_bool_t dc_event_handler(rtgui_widget_t* widget, rtgui_event_t *event)
|
||||
rtgui_dc_draw_text(dc, "RT-Thread/GUI<55><49><EFBFBD>汾", &rect);
|
||||
#endif
|
||||
|
||||
{
|
||||
rtgui_rect_t rect = {0, 0, 0x1c, 0x16};
|
||||
rtgui_rect_moveto(&rect, 80, 80);
|
||||
rtgui_image_blit((rtgui_image_t*)&play_image, dc, &rect);
|
||||
|
||||
rect.x1 = 0; rect.y1 = 0;
|
||||
rect.x2 = 0x1c; rect.y2 = 0x16;
|
||||
rtgui_rect_moveto(&rect, 130, 80);
|
||||
rtgui_image_blit((rtgui_image_t*)&stop_image, dc, &rect);
|
||||
}
|
||||
/* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>Բ<EFBFBD><D4B2> */
|
||||
RTGUI_DC_FC(dc) = red;
|
||||
rtgui_dc_draw_circle(dc, rect.x1 + 10, rect.y1 + 10, 10);
|
||||
|
||||
Reference in New Issue
Block a user