AgateLib.Geometry.Gradient Struct Reference

A four color gradient, with a different color value for each corner. More...

List of all members.

Public Member Functions

 Gradient (Color color)
 Initializes a gradient with the same color in all four corners.
 Gradient (Color tl, Color tr, Color bl, Color br)
 Initializes a gradient.
void SetAlpha (double alpha)
 Sets the alpha value for all corners. Valid values are 0.0 to 1.0. Values outside this are clamped.
Color Interpolate (double x, double y)
 Interpolates the color into the interior of the gradient. Parameters should be in the range 0.0 to 1.0; they are clamped if outside this range.

Properties

Color TopLeft [get, set]
 Gets or sets the color for the top left.
Color TopRight [get, set]
 Gets or sets the color for the top right.
Color BottomLeft [get, set]
 Gets or sets the color for the bottom left.
Color BottomRight [get, set]
 Gets or sets the color for the bottom right.
Color AverageColor [get]
 Calculates the color which is the average of all four colors.


Detailed Description

A four color gradient, with a different color value for each corner.


Constructor & Destructor Documentation

AgateLib.Geometry.Gradient.Gradient ( Color  color  ) 

Initializes a gradient with the same color in all four corners.

Parameters:
color 

AgateLib.Geometry.Gradient.Gradient ( Color  tl,
Color  tr,
Color  bl,
Color  br 
)

Initializes a gradient.

Parameters:
tl The top left color.
tr The top right color.
bl The bottom left color.
br The bottom right color.


Member Function Documentation

Color AgateLib.Geometry.Gradient.Interpolate ( double  x,
double  y 
)

Interpolates the color into the interior of the gradient. Parameters should be in the range 0.0 to 1.0; they are clamped if outside this range.

Parameters:
x Distance from the left side of the gradient. 0.0 is on the left side, 1.0 is on the right.
y Distance from the top of the gradient. 0.0 is on the top, 1.0 is on the bottom.
Returns:

void AgateLib.Geometry.Gradient.SetAlpha ( double  alpha  ) 

Sets the alpha value for all corners. Valid values are 0.0 to 1.0. Values outside this are clamped.

Parameters:
alpha 


Property Documentation

Color AgateLib.Geometry.Gradient.AverageColor [get]

Calculates the color which is the average of all four colors.

Color AgateLib.Geometry.Gradient.BottomLeft [get, set]

Gets or sets the color for the bottom left.

Color AgateLib.Geometry.Gradient.BottomRight [get, set]

Gets or sets the color for the bottom right.

Color AgateLib.Geometry.Gradient.TopLeft [get, set]

Gets or sets the color for the top left.

Color AgateLib.Geometry.Gradient.TopRight [get, set]

Gets or sets the color for the top right.


The documentation for this struct was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo