Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use UGL to realize the filling of closed graphics in vxworks

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to use UGL to fill closed graphics in vxworks. It is very detailed and has a certain reference value. Friends who are interested must read it!

A closed 2D graphic that is filled with the background color by default when its background color is opaque

The code is as follows

# include

Void uglTest () {# define WIDTH 32 # define HIGHT 32 UINT8 gramnDataWIDTH * HIGHT/__SIZEOF_INT__] = {0x00Magic 0xf0re0x00,0x00re0xfeffre0x00,0x01m0xffre0x80,0x03Magne0xffre0xc0,0x07m0xffm0xffm0xff0xf0xff0xf0xff0xf0f0xff0xf0xf8, 0x3fm0xffre0xffre0xfc, 0x3f 0xff0xff0xff0xff0xf0xf0xff0xf0xf0xff0xf0xf0xf0xff0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xff0xf0xf0xf0xf0xf0xf0xf0xff0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0xf0x 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,200,300,0,0,0,0); uglRectangle (gc, 250,10350,300); return;}

The above is all the contents of the article "how to use UGL to fill closed graphics in vxworks". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report