예제 #1
0
        private void UpdateEffect(object source)
        {
            _multiColorGlyph = source as MultiColorGlyph;
            if (_multiColorGlyph != null)
            {
                Effect = null;
                return;
            }

            _imageSource = TryConvertToImageSource(source);
            if (_imageSource != null)
            {
                if (_imageEffect == null)
                {
                    _imageEffect = new ImageEffect();
                    OnImageEffectChanged();
                }

                // Set custom pixel shader.
                Effect = _imageEffect;
            }
        }
예제 #2
0
파일: Icon.cs 프로젝트: Zolniu/DigitalRune
        private void UpdateEffect(object source)
        {
            _multiColorGlyph = source as MultiColorGlyph;
            if (_multiColorGlyph != null)
            {
                Effect = null;
                return;
            }

            _imageSource = TryConvertToImageSource(source);
            if (_imageSource != null)
            {
                if (_imageEffect == null)
                {
                    _imageEffect = new ImageEffect();
                    OnImageEffectChanged();
                }

                // Set custom pixel shader.
                Effect = _imageEffect;
            }
        }