Ejemplo n.º 1
0
        public virtual void UpdateWithHSV(HSV hsv)
        {
            HSV hsvTemp;

            hsvTemp.S = 1;
            hsvTemp.H = hsv.H;
            hsvTemp.V = 1;

            RGBA rgb = CCControlUtils.RGBfromHSV(hsvTemp);

            Background.Color = new CCColor3B((byte)(rgb.R * 255.0f), (byte)(rgb.G * 255.0f), (byte)(rgb.B * 255.0f));
        }
Ejemplo n.º 2
0
        public void ColourSliderValueChanged(Object sender, CCControlEvent controlEvent)
        {
            Hsv.S = ((CCControlSaturationBrightnessPicker)sender).Saturation;
            Hsv.V = ((CCControlSaturationBrightnessPicker)sender).Brightness;

            RGBA rgb = CCControlUtils.RGBfromHSV(Hsv);

            // XXX fixed me if not correct
            base.Color = new CCColor3B((byte)(rgb.R * 255.0f), (byte)(rgb.G * 255.0f), (byte)(rgb.B * 255.0f));

            // Send Control callback
            SendActionsForControlEvents(CCControlEvent.ValueChanged);
        }
Ejemplo n.º 3
0
        public void HueSliderValueChanged(Object sender, CCControlEvent controlEvent)
        {
            Hsv.H = ((CCControlHuePicker)sender).Hue;

            RGBA rgb = CCControlUtils.RGBfromHSV(Hsv);

            // XXX fixed me if not correct
            base.Color = new CCColor3B((byte)(rgb.R * 255.0f), (byte)(rgb.G * 255.0f), (byte)(rgb.B * 255.0f));

            // Send Control callback
            SendActionsForControlEvents(CCControlEvent.ValueChanged);
            UpdateControlPicker();
        }