Пример #1
0
        public static ColorMatrixColorFilter GetColorFilter(bool disabled, bool highlighted)
        {
            if (_cdDownloadItemGrayscale == null)
            {
                var cm = new ColorMatrixBuilder().Saturation(0.0f).Create();
                _cdDownloadItemGrayscale = new ColorMatrixColorFilter(cm);
            }

            if (_cdDownloadItemHighlighted == null)
            {
                var cm = new ColorMatrixBuilder().Hue(-20f).Create();
                _cdDownloadItemHighlighted = new ColorMatrixColorFilter(cm);
            }

            if (disabled)
            {
                return(_cdDownloadItemGrayscale);
            }

            if (highlighted)
            {
                return(_cdDownloadItemHighlighted);
            }

            return(null);
        }
Пример #2
0
        private static ColorMatrixColorFilter GetCommonColorFilter()
        {
            if (_cfPoiCommon == null)
            {
                var cm = new ColorMatrixBuilder().Hue(+30).Brightness(-100).Saturation(0.4f).Create();
                _cfPoiCommon = new ColorMatrixColorFilter(cm);
            }

            return(_cfPoiCommon);
        }
Пример #3
0
        private static ColorMatrixColorFilter GetFavouriteColorFilter()
        {
            if (_cfPoiFavourite == null)
            {
                var cm = new ColorMatrixBuilder().Hue(-30).Create();
                _cfPoiFavourite = new ColorMatrixColorFilter(cm);
            }

            return(_cfPoiFavourite);
        }
Пример #4
0
        private static ColorMatrixColorFilter GetImportantColorFilter()
        {
            if (_cfPoiImportant == null)
            {
                var cm = new ColorMatrixBuilder().Create();
                _cfPoiImportant = new ColorMatrixColorFilter(cm);
            }

            return(_cfPoiImportant);
        }