MTK中模拟时钟的绘制

本文介绍了MTK中模拟时钟的绘制,包括结构体`gui_clock_struct`的重要性和使用,以及`gui_clock_analog_clock_initialize`函数中对时间比较的处理。还展示了用于绘制时钟的浮点数表`g_gui_clock_acm_sine_table`和`g_gui_clock_acm_cosine_table`。此外,提到一个实用的辅助函数`applib_dt_dow`,用于计算日期对应的星期几。
摘要由CSDN通过智能技术生成

 

gui_clock.h

 

typedef struct
{
    gui_clock_type_enum type;   /*clock type*/
    gui_clock_digital_align_enum align_type; /* align type */
    S32 x,y;
    S32 width,height;
    void (*hide_callback) (S32 x1, S32 y1, S32 x2, S32 y2);/*hide function*/
    GDI_HANDLE target_layer;    /*target layer to display*/
    GDI_HANDLE abm_layer;    /* alpha blending layer of clock */
    GDI_HANDLE target_lcd;      /*target lcd to display*/
    applib_time_struct diff; /*record the difference between set-time and phone-time*/????????
    S32 time_compare;   /*difference between set-time and cur-time*/???????
    MMI_BOOL active;      /*clock is active or not*/
    UI_font_type date_text_font;    /*font of date text*/
    UI_font_type time_text_font;    /*font of time text*/
    color date_text_color;              /*color of date text*/
    color date_text_border_color;/*border color of date text*/
    color time_text_color;             /*color of time text*/
    color time_text_border_color;/*border color of time text*/

    color analog_hand_hour_color;           /*color of hour hand*/
    color analog_hand_min_color;            /*color of minute hand*/
    color analog_axis_color;                    /*color of axis (not used)*/

    S32  gap_between_two_lines;         /*gap between date text and time text*/
    S32  gap_between_time_date_one_line;    /*gap bet

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值