C# Class Flood.GUI.Controls.ColorLerpBox

Linear-interpolated HSV color box.
Inheritance: Control
Mostra file Open project: FloodProject/flood Class Usage Examples

Public Methods

Method Description
ColorLerpBox ( Control parent ) : Flood.GUI.Input

Initializes a new instance of the ColorLerpBox class.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Lerp ( Color toColor, Color fromColor, float amount ) : Color

Linear color interpolation.

SetColor ( Color value, bool onlyHue = true ) : void

Sets the selected color.

Protected Methods

Method Description
OnMouseClickedLeft ( int x, int y, bool down ) : void

Handler invoked on mouse click (left) event.

OnMouseMoved ( int x, int y, int dx, int dy ) : void

Handler invoked on mouse moved event.

Render ( Skins skin ) : void

Renders the control using specified skin.

Private Methods

Method Description
CreateGradientBitmap ( Skin skin ) : void
GetColorAt ( int x, int y ) : Color

Gets the color from specified coordinates.

Method Details

ColorLerpBox() public method

Initializes a new instance of the ColorLerpBox class.
public ColorLerpBox ( Control parent ) : Flood.GUI.Input
parent Control Parent control.
return Flood.GUI.Input

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Lerp() public static method

Linear color interpolation.
public static Lerp ( Color toColor, Color fromColor, float amount ) : Color
toColor Color
fromColor Color
amount float
return Color

OnMouseClickedLeft() protected method

Handler invoked on mouse click (left) event.
protected OnMouseClickedLeft ( int x, int y, bool down ) : void
x int X coordinate.
y int Y coordinate.
down bool If set to true mouse button is down.
return void

OnMouseMoved() protected method

Handler invoked on mouse moved event.
protected OnMouseMoved ( int x, int y, int dx, int dy ) : void
x int X coordinate.
y int Y coordinate.
dx int X change.
dy int Y change.
return void

Render() protected method

Renders the control using specified skin.
protected Render ( Skins skin ) : void
skin Skins Skin to use.
return void

SetColor() public method

Sets the selected color.
public SetColor ( Color value, bool onlyHue = true ) : void
value Color Value to set.
onlyHue bool Deetrmines whether to only set H value (not SV).
return void