Beispiel #1
0
            public override void VisitLinearGradientBrush( Types.Rectangle bounds, Paint.Brushes.LinearGradientBrush linearGradientBrush )
            {
                List<KeyValuePair<double, Paint.Color>> intermediates = new List<KeyValuePair<double, Paint.Color>>();

                foreach( KeyValuePair<double, Paint.Color> kvp in linearGradientBrush.IntermediateColors )
                {
                    intermediates.Add( new KeyValuePair<double, Paint.Color>( kvp.Key, new Paint.Color( kvp.Value, kvp.Value.Alpha * _multiplier ) ) );
                }

                _newBrush = new Paint.Brushes.LinearGradientBrush
                    ( new Paint.Color( linearGradientBrush.StartColor, linearGradientBrush.StartColor.Alpha * _multiplier )
                    , new Paint.Color( linearGradientBrush.EndColor, linearGradientBrush.EndColor.Alpha * _multiplier )
                    , linearGradientBrush.StartPoint, linearGradientBrush.EndPoint, intermediates.ToArray() );
            }
Beispiel #2
0
 public override void VisitSolidBrush( Types.Rectangle bounds, Paint.Brushes.SolidBrush solidBrush )
 {
     _newBrush = new Paint.Brushes.SolidBrush( new Paint.Color( solidBrush.Color, solidBrush.Color.Alpha * _multiplier ) );
 }
Beispiel #3
0
 public override void VisitRadialGradientBrush( Types.Rectangle bounds, Paint.Brushes.RadialGradientBrush radialGradientBrush )
 {
     _newBrush = new VectorGraphics.Paint.Brushes.RadialGradientBrush
         ( new Paint.Color( radialGradientBrush.InnerColor, radialGradientBrush.InnerColor.Alpha * _multiplier )
         , new Paint.Color( radialGradientBrush.OuterColor, radialGradientBrush.OuterColor.Alpha * _multiplier )
         , radialGradientBrush.InnerPoint, radialGradientBrush.OuterPoint );
 }
 public PathPaintModifier( Paint.Pens.Pen pen, Paint.Brushes.Brush brush )
 {
     _pen = pen;
     _brush = brush;
 }