// canvas::draw overridable virtual void draw( HELEMENT he, graphics& gx, UINT width, UINT height ) { SYSTEMTIME st; GetLocalTime(&st); //Use GetSystemTime(&st); - if you need clocks in UTC or other TZ //you may use something like get_attribute("timezone") const wchar_t* caption = dom::element(he).get_attribute("caption"); if( caption ) draw_caption( he, gx, width, height, aux::chars_of(caption) ); draw_clock_hand(he, gx,width,height, (st.wHour * 360.0) / 12.0 + st.wMinute / 2.0, 0); draw_clock_hand(he, gx,width,height, (st.wMinute * 360.0) / 60.0, 1); draw_clock_hand(he, gx,width,height, (st.wSecond * 360.0) / 60.0, 2); }
void QPlot::paintEvent(QPaintEvent* /*event*/) { QPainter painter(this); draw_coordinate_system(painter); if(draw_ByteArray_flag) { draw_ByteArray(painter); } if(draw_Data_flag) { draw_Data(painter); } draw_caption(painter); draw_strings(painter); }
static int draw_window(window_t *win) { ctrl_t *child; void *ctx; rect_t *rc = &win->client; draw_caption(&win->caption); draw_panel(&win->panel); send_message(win, MSG_DRAW_CLIENT,0,0); // draw_frame(win); // child = (ctrl_t*)win->child.next; // while( &child->link != &win->child) // { // send_message(child, 1, 0, 0); // child = (ctrl_t*)child->link.next; // }; return 0; };