扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
这篇文章主要介绍vxworks中如何使用UGL实现封闭图形的填充,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
创新互联建站是一家专注于成都网站设计、网站制作与策划设计,叶县网站建设哪家好?创新互联建站做网站,专注于网站建设十载,网设计领域的专业建站公司;建站业务涵盖:叶县等地区。叶县做网站价格咨询:18980820575
代码如下
#include
void uglTest ()
{
#define WIDTH 32
#define HIGHT 32
UINT8 patternData[WIDTH*HIGHT/__SIZEOF_INT__] =
{
0x00,0x0f,0xf0,0x00,
0x00,0x7f,0xfe,0x00,
0x01,0xff,0xff,0x80,
0x03,0xff,0xff,0xc0,
0x07,0xff,0xff,0xe0,
0x0f,0xff,0xff,0xf0,
0x1f,0xff,0xff,0xf8,
0x3f,0xff,0xff,0xfc,
0x3f,0x8f,0xf1,0xfc,
0x7f,0x07,0xe0,0xfe,
0x7f,0x07,0xe0,0xfe,
0x7f,0x07,0xe0,0xfe,
0xff,0x8f,0xf1,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,
0xf9,0xff,0xff,0x9f,
0x79,0xff,0xff,0x9e,
0x78,0xff,0xff,0x1e,
0x7c,0xff,0xff,0x3e,
0x3c,0x7f,0xfe,0x3c,
0x3e,0x1f,0xf8,0x7c,
0x1f,0x03,0xe0,0xf8,
0x0f,0xc0,0x03,0xf0,
0x07,0xf8,0x1f,0xe0,
0x03,0xff,0xff,0xc0,
0x01,0xff,0xff,0x80,
0x00,0x7f,0xfe,0x00,
0x00,0x0f,0xf0,0x00
};
UGL_REG_DATA *pRegData;
UGL_GC_ID gc;
UGL_MDDB_ID patternDdb;
UGL_MDIB patternDib = {WIDTH, HIGHT, WIDTH, patternData};
uglDisplayOpen(0, 0, 0);
pRegData = uglRegistryFind (UGL_DISPLAY_TYPE, 0, 0, 0);
gc = uglGcCreate((UGL_DEVICE_ID)pRegData->id);
patternDdb = uglMonoBitmapCreate((UGL_DEVICE_ID)pRegData->id, &patternDib,
UGL_DIB_INIT_DATA, 0, UGL_NULL);
uglFillPatternSet(gc, patternDdb);
uglForegroundColorSet(gc, 0xff0000);
uglBackgroundColorSet(gc, 0x00ff00);
uglEllipse(gc, 10, 10, 200, 300, 0, 0, 0, 0);
uglRectangle(gc, 250, 10, 350, 300);
return;
}
以上是“vxworks中如何使用UGL实现封闭图形的填充”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注创新互联行业资讯频道!
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流