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

Go to the source code of this file.

Classes

struct  ui::Renderable
 An abstract interface for arbitrary renderable objects. More...
 

Typedefs

typedef std::function< color_t(color_t color, const Coords &coords, const Size &size)> ui::shader_oneframe_t
 A pixel shader that's independent of the current time.
 
typedef std::function< color_t(color_t color, const Coords &coords, const Size &size, time_t time)> ui::shader_animated_t
 A pixel shader that may update based on the current time.
 
typedef shader_animated_t ui::shader_t
 A pixel shader that may or may not update based on the current time.
 

Typedef Documentation

◆ shader_animated_t

A pixel shader that may update based on the current time.

Pixel shaders are run on a per-pixel basis and do not have access to previous data or other pixels.

Parameters
colorThe color of the current pixel, before any shader is applied.
coordsThe [x,y] coordinates of the pixel, relative to the renderable this shader is applied to.
sizeThe [width,height] size of the renderable.
timeThe current time in milliseconds.

◆ shader_oneframe_t

A pixel shader that's independent of the current time.

Pixel shaders are run on a per-pixel basis and do not have access to previous data or other pixels.

Parameters
colorThe color of the current pixel, before any shader is applied.
coordsThe [x,y] coordinates of the pixel, relative to the renderable this shader is applied to.
sizeThe [width,height] size of the renderable.

◆ shader_t

A pixel shader that may or may not update based on the current time.

Pixel shaders are run on a per-pixel basis and do not have access to previous data or other pixels.

Parameters
colorThe color of the current pixel, before any shader is applied.
coordsThe [x,y] coordinates of the pixel, relative to the renderable this shader is applied to.
sizeThe [width,height] size of the renderable.
timeThe current time in milliseconds.