Пример #1
0
        private void SetDefaultColorMatrixThemes()
        {
            ColorMatrixThemes = new Dictionary <string, ColorMatrixTheme>();

            ColorMatrixTheme theme = new ColorMatrixTheme();

            theme.ThemeName       = "Grayscale";
            theme.BackgroundColor = theme.StartColor = Color.White;
            theme.FontColor       = theme.EndColor = Color.Black;
            theme.Dia             = 20;
            theme.Flip            = false;
            ColorMatrixThemes.Add(theme.ThemeName, theme);

            theme                 = new ColorMatrixTheme();
            theme.ThemeName       = "Blue-Red scale";
            theme.BackgroundColor = Color.Black;
            theme.StartColor      = Color.Blue;
            theme.EndColor        = Color.Red;
            theme.FontColor       = Color.White;
            theme.Dia             = 20;
            theme.Flip            = true;
            ColorMatrixThemes.Add(theme.ThemeName, theme);

            theme                 = new ColorMatrixTheme();
            theme.ThemeName       = "Custom";
            theme.BackgroundColor = Color.Black;
            theme.StartColor      = Color.LightGreen;
            theme.EndColor        = Color.Red;
            theme.FontColor       = Color.White;
            theme.Dia             = 20;
            theme.Flip            = false;
            ColorMatrixThemes.Add(theme.ThemeName, theme);
        }
Пример #2
0
 public void SetTheme(ColorMatrixTheme theme)
 {
     Theme = theme;
     ColorToHSV(theme.StartColor, out hueStart, out saturationStart, out brightnessStart);
     ColorToHSV(theme.EndColor, out hueEnd, out saturationEnd, out brightnessEnd);
 }