示例#1
0
 public void Draw(Graphics g, ColorHandler.ARGB argb)
 {
     // Given RGB values, calculate HSV and then update the screen.
     this.g = g;
     HSV    = ColorHandler.RGBtoHSV(argb);
     CalcCoordsAndUpdate(HSV);
     UpdateDisplay();
 }
示例#2
0
 private void HandleRGBScroll(object sender, EventArgs e)
 {
     // If the R, G, or B values change, use this
     // code to update the HSV values and invalidate
     // the color wheel (so it updates the pointers).
     // Check the isInUpdate flag to avoid recursive events
     // when you update the NumericUpdownControls.
     changeType = ChangeStyle.RGB;
     argb       = new ColorHandler.ARGB(tbAlpha.Value, tbRed.Value, tbGreen.Value, tbBlue.Value);
     SetHSV(ColorHandler.RGBtoHSV(argb));
     SetRGBLabels(argb);
     Invalidate();
 }