Gradient

This defines a Gradient used when drawing.

One thing to remember it that the gradient is always drawn from the top left corner of the image. And is repeated if it's smaller then the image height or width. This mean that the gradient you see in the object you are filling does not determine the stating point of the gradient but is filled the part of the gradient that would be there when starting at the top left corner of the image.

struct Gradient {
size_t size;
GradientDirection direction;
Color startColor;
Color endColor;
}

Constructors

this
this(Color startColor, Color endColor, size_t size, GradientDirection direction = GradientDirection.Vertical)

Define a linear gradient.

Meta