用LM3s9b96自己画了块板子,使用了一块240*400的TFT LCD。已经将grlib 的 Displaydriver 层修改好,现在调用displaydriver层或者graphics primitives层的函数均可正常使用。对于widget层,如果widget tree结构<3可以正常工作,再多则出问题,贴下代码:Canvas(g_sBottom, &g_sBackground, 0, 0,
&g_sHuawei240x400x16_SPFD5420A, 0, (240 - 23), 400, 23,
(CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT),
ClrBlue, ClrWhite, ClrWhite, &g_sFontCm20, "LM3S9B96", 0, 0); Canvas(g_sMiddle, &g_sBackground, &g_sBottom, 0,
&g_sHuawei240x400x16_SPFD5420A, 0, 118, 400, 23,
(CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT),
ClrBlue, ClrWhite, ClrWhite, &g_sFontCm20, "Hello Word!", 0, 0); Canvas(g_sHeading, &g_sBackground, &g_sMiddle, 0,
&g_sHuawei240x400x16_SPFD5420A, 0, 0, 400, 23,
(CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT),
ClrBlue, ClrWhite, ClrWhite, &g_sFontCm20, "Help!", 0, 0); Canvas(g_sBackground, WIDGET_ROOT, 0, &g_sHeading,
&g_sHuawei240x400x16_SPFD5420A, 0, 0, 400, 240,
CANVAS_STYLE_FILL, ClrLawnGreen, 0, 0, 0, 0, 0, 0);
不能正常工作,但是只将g_sHeading or g_sMiddle or g_sBottom作为g_sBackground的pChild都可以正常工作。哪位知道我哪出现问题了么?谢谢!
[
本帖最后由 kshark343 于 2011-10-13 10:11 编辑 ]
此帖出自
小平头技术问答
一周热门 更多>