// 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(); }
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(); }
public ColorChangedEventArgs(ColorHandler.ARGB RGB, ColorHandler.AHSV HSV) { mRGB = RGB; mHSV = HSV; }
public void Draw(Graphics g, ColorHandler.AHSV AHSV) { // Given AHSV values, update the screen. this.g = g; this.AHSV = AHSV; CalcCoordsAndUpdate(this.AHSV); UpdateDisplay(); }