C# Class ARCed.Core.ColorWheel

Color wheel for getting a user-selected color
Inheritance: IDisposable
Show file Open project: borisblizzard/arcreator

Public Properties

Property Type Description
ColorChanged ColorChangedEventHandler

Private Properties

Property Type Description
CalcBrightnessPoint Point
CalcCoordsAndUpdate void
CalcDegrees int
CreateGradient void
DrawBrightnessPointer void
DrawColorPointer void
DrawLinearGradient void
GetColors Color[]
GetPoint Point
GetPoints Point[]
UpdateDisplay void

Public Methods

Method Description
ColorWheel ( Rectangle colorRectangle, Rectangle brightnessRectangle, Rectangle selectedColorRectangle ) : System

Default constructor

Draw ( Graphics g, ColorHandler hsv ) : void

Draws the images

Draw ( Graphics g, Point mousePoint ) : void

Draws the images

IDisposable ( ) : void
SetMouseUp ( ) : void

Sets the mouse state to MouseState.MouseUp

Protected Methods

Method Description
OnColorChanged ( ColorHandler argb, ColorHandler hsv ) : void

Private Methods

Method Description
CalcBrightnessPoint ( int brightness ) : Point
CalcCoordsAndUpdate ( ColorHandler hsv ) : void
CalcDegrees ( Point pt ) : int
CreateGradient ( ) : void
DrawBrightnessPointer ( Point pt ) : void
DrawColorPointer ( Point pt ) : void
DrawLinearGradient ( Color topColor ) : void
GetColors ( ) : Color[]
GetPoint ( double degrees, double radius, Point centerPoint ) : Point
GetPoints ( double radius, Point centerPoint ) : Point[]
UpdateDisplay ( ) : void

Method Details

ColorWheel() public method

Default constructor
public ColorWheel ( Rectangle colorRectangle, Rectangle brightnessRectangle, Rectangle selectedColorRectangle ) : System
colorRectangle System.Drawing.Rectangle Rectangle for the color wheel image
brightnessRectangle System.Drawing.Rectangle Rectangle for the brightness control
selectedColorRectangle System.Drawing.Rectangle Rectangle for the selected color control
return System

Draw() public method

Draws the images
public Draw ( Graphics g, ColorHandler hsv ) : void
g System.Drawing.Graphics Graphics context to draw with
hsv ColorHandler HSV color to draw
return void

Draw() public method

Draws the images
public Draw ( Graphics g, Point mousePoint ) : void
g System.Drawing.Graphics Graphics context to draw with
mousePoint Point MousePoint to draw
return void

IDisposable() public method

public IDisposable ( ) : void
return void

OnColorChanged() protected method

protected OnColorChanged ( ColorHandler argb, ColorHandler hsv ) : void
argb ColorHandler
hsv ColorHandler
return void

SetMouseUp() public method

Sets the mouse state to MouseState.MouseUp
public SetMouseUp ( ) : void
return void

Property Details

ColorChanged public property

Handler for color change events
public ColorChangedEventHandler ColorChanged
return ColorChangedEventHandler