Exemplo n.º 1
0
 // If the H, S, or V values change, use this
 // code to update the RGB values and invalidate
 // the color wheel (so it updates the pointers).
 // Check the isInUpdate flag to avoid recursive events
 // when you update the NumericUpdownControls.
 private void HandleHSVScroll(object sender,  ScrollEventArgs e)
 {
     changeType = ChangeStyle.AHSV;
     AHSV = new ColorHandler.AHSV(hsbAlpha.Value, hsbHue.Value, hsbSaturation.Value, hsbBrightness.Value);
     SetARGB(ColorHandler.AHSVtoARGB(AHSV));
     SetAHSVLabels(AHSV);
     this.Invalidate();
 }
Exemplo n.º 2
0
 public void Draw(Graphics g, ColorHandler.ARGB ARGB)
 {
     // Given RGB values, calculate AHSV and then update the screen.
       this.g = g;
       this.AHSV = ColorHandler.ARGBtoAHSV(ARGB);
       CalcCoordsAndUpdate(this.AHSV);
       UpdateDisplay();
 }
Exemplo n.º 3
0
 public ColorChangedEventArgs(ColorHandler.ARGB RGB, ColorHandler.AHSV HSV)
 {
     mRGB = RGB;
       mHSV = HSV;
 }
Exemplo n.º 4
0
 public void Draw(Graphics g, ColorHandler.AHSV AHSV)
 {
     // Given AHSV values, update the screen.
       this.g = g;
       this.AHSV = AHSV;
       CalcCoordsAndUpdate(this.AHSV);
       UpdateDisplay();
 }