gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
rainbow_cycle.hpp File Reference

Go to the source code of this file.

Functions

template<unsigned int frequency>
color_t ui::shader::rainbow_cycle (color_t pixel, const Coords &coords, const Size &size, time_t time)
 A pixel shader that smoothly rotates the original color's hue through the rainbow.
 

Function Documentation

◆ rainbow_cycle()

template<unsigned int frequency>
color_t ui::shader::rainbow_cycle ( color_t  pixel,
const Coords coords,
const Size size,
time_t  time 
)

A pixel shader that smoothly rotates the original color's hue through the rainbow.

Template Parameters
frequencyThe number of milliseconds it takes to make one full cycle.
Parameters
pixelThe original pixel color.
coordsThe coords of the current pixel.
sizeThe total size of the image.
timeThe current clock time in milliseconds.