这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界» 论坛首页» 嵌入式开发» MCU» windml里写字的问题

共1条 1/1 1 跳转至

windml里写字的问题

菜鸟
2005-03-07 22:43:03 打赏

在Windml里写字,是不是创建了一个font之后,只能调用一次uglTextDraw,如果要写其他字就要重新创建font?下面的程序能实现吗?先写0.125再写0.345

uglFontFindString(fontDrvId, "familyName=Courier; pixelSize = 12", &DialogFontDef); if ((fontDialog= uglFontCreate(fontDrvId, &DialogFontDef)) == UGL_NULL) { printf("Font not found. Exiting.\n"); return; }

uglBackgroundColorSet(gc, colorTable[BLACK].uglColor); uglForegroundColorSet(gc, colorTable[LIGHTGREEN].uglColor); uglTextSizeGetW(fontDialog, &textWidth, &textHeight, -1, "0.125"); uglFontSet(gc, fontDialog); uglTextDrawW(gc, 0, 0, -1, "0.125");

uglTextSizeGetW(fontDialog, &textWidth, &textHeight, -1, "0.345"); uglFontSet(gc, fontDialog); uglTextDrawW(gc, 0, 0, -1, "0.345");




关键词: windml 写字 问题

共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册]