Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How UGL draws polygons

Shulou Source: shulou.com Published: 2022-06-01 09:51:34 10月03日 Update

This article will explain in detail how UGL draws polygons. Xiaobian thinks it is quite practical, so share it with you for reference. I hope you can gain something after reading this article.

Drawing Polygon in WindML

The main function is uglPolygon(). The parameter pData is used to indicate the coordinates of each vertex. The first and last two points need to be consistent, so the number of numPoints is one more than the actual number of vertices of the polygon. In addition, you need to indicate the foreground color (border) and background color (fill).

and self-intersecting graphs.

What about borderless graphics? Two options: transparent foreground, or 0 line width

If the beginning and end are inconsistent, it indicates a non-closed figure, i.e. a broken line.

Different raster effects, uglRasterModeSet(), can refer to the line drawing operation

If the polygon you want to draw is a rectangle and one of its edges is horizontal, you can use uglRectangle() directly. Not only the parameters are simple, but more importantly: the underlying driver can be implemented with horizontal lines or area fills, coupled with the hardware acceleration function of the graphics card, the rendering speed can be improved hundreds of times.

About "UGL how to draw polygons" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

Tags: Polygons graphics articles consistency parameters more horizontal border head and tail reference different good practical important hundreds thousands two number raster content Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Apple macOS Linux Shulou Information