Advertisement
2002C Graphics #10609

Super Gradients (Multiple Colours and custom colour positions supported)

Super Gradients is a class that allows you to draw gradients at blazing speeds with n number of colours at required positions. It is incredibly simple to use. Drop the class in your project, give one array containing all the colours and one array containing the position of the colours (positioning is optional) and simply ask it to render. The given example implementation shows you how to draw Microsoft Word style Gold and Chrome effects. Also includes a demonstration on setting a colour's position in the gradient (use the scrollbar). The next demonstration shows you how to draw Box-style gradients and uses 16 randomly generated colours. Also has examples on simple setup style two colour gradients. All the above stated examples can be seen in the pic below with the Gold effect filled in. If you have some experience in graphics, you can also use the given functions to implement with very less effort your own gradient styles such as circular, conical or radial, from corners or even diagonal. Please feel free to comment. Thanks.

AI

Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Zdrojový kód
original-source
Upload
Původní komentáře (3)
Obnoveno z Wayback Machine