您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
这篇文章主要介绍vxworks中如何使用UGL实现封闭图形的填充,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
代码如下
#include <ugl/ugl.h>
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实现封闭图形的填充”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。