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 draw a picture with WindML

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

Share

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

This article mainly shows you "how to draw a picture with WindML". The content is simple and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn this article "how to draw a picture with WindML".

How easy is it to draw a picture with WindML?

First include the header file ugl.h

Then call uglDisplayOpen () to create a display device

Then call uglGcCreate () to create the graphics context

Then you can write the application.

This example is simple enough to draw a yellow line on the screen, and the valid line of code is only 5!

There are a few details to know.

There is usually only one display device in WindML, so the first parameter of uglDisplayOpen () is fine with 0, and there is no need to return the last two parameters.

If the application needs to exit, the previous resources are released in reverse order. In this case, uglGcDestroy (gc) and uglDisplayClose (0) are called at the end. However, embedded applications generally do not need to quit.

When setting the color in this example, I was lazy and directly used the RGB value, because the current graphics card uses a 32-bit color. The normal process should convert the RGB value to UGL_COLOR with uglColorAlloc ().

If you want to use keyboard and mouse, you need to find InputService first.

If you want to draw text, you need to create a Font first. There are many functions involved, so you have time to sort it out.

The above is all the contents of the article "how to draw a picture with WindML". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more 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