ScreenToGif.Windows.Other.ColorSelector.UpdateMarkerPosition C# (CSharp) Méthode

UpdateMarkerPosition() private méthode

private UpdateMarkerPosition ( Color theColor ) : void
theColor Color
Résultat void
        private void UpdateMarkerPosition(Color theColor)
        {
            _colorPosition = null;

            HsvColor hsv = ColorExtensions.ConvertRgbToHsv(theColor.R, theColor.G, theColor.B);

            CurrentColor.Background = LastColor.Background = new SolidColorBrush(theColor);

            ColorSlider.Value = hsv.H;

            var p = new Point(hsv.S, 1 - hsv.V);

            _colorPosition = p;
            p.X = p.X * ColorDetail.ActualWidth;
            p.Y = p.Y * ColorDetail.ActualHeight;
            _markerTransform.X = p.X;
            _markerTransform.Y = p.Y;
        }

Same methods

ColorSelector::UpdateMarkerPosition ( Point p ) : void