Gradient

Undocumented in source.

Constructors

this
this(T from, T to, ulong steps)
Undocumented in source.

Members

Functions

empty
bool empty()
Undocumented in source. Be warned that the author may not have intended to support it.
popFront
void popFront()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

count
ulong count;
Undocumented in source.
end
RGB888 end;
Undocumented in source.
front
RGB888 front;
Undocumented in source.
index
ulong index;
Undocumented in source.
start
RGB888 start;
Undocumented in source.

Examples

import std.algorithm;
import std.range;
assert(Gradient(RGB888(255,0,0), RGB888(0,0,255), 20).equal(
	only(
		RGB888(255, 0, 0),
		RGB888(241, 0, 13),
		RGB888(228, 0, 26),
		RGB888(214, 0, 40),
		RGB888(201, 0, 53),
		RGB888(187, 0, 67),
		RGB888(174, 0, 80),
		RGB888(161, 0, 93),
		RGB888(147, 0, 107),
		RGB888(134, 0, 120),
		RGB888(120, 0, 134),
		RGB888(107, 0, 147),
		RGB888(93, 0, 161),
		RGB888(80, 0, 174),
		RGB888(67, 0, 187),
		RGB888(53, 0, 201),
		RGB888(40, 0, 214),
		RGB888(26, 0, 228),
		RGB888(13, 0, 241),
		RGB888(0, 0, 254)
	)
));

Meta