public GlossyBrush( Paint.Color lightener ) { if( lightener == null ) { throw new ArgumentNullException( "lightener" ); } _lightener = lightener; }
public Paint.Brushes.Brush Create( Paint.Color color, Paint.Color lighterColor, double top, double bottom, double proportion ) { Paint.Color white = new Paint.Color( _lightener, color.Alpha ); Paint.Color topStart = Paint.Color.Combine( color, white, 0.4 ); Paint.Color topEnd = Paint.Color.Combine( color, white, 0.7 ); Paint.Color bottomStart = color; Paint.Color bottomEnd = lighterColor; return new Paint.Brushes.LinearGradientBrush ( topStart, bottomEnd , new Types.Point( 0, top ), new Types.Point( 0, bottom ) , Paint.Brushes.LinearGradientBrush.RenderHint.NoClip , new KeyValuePair<double, Paint.Color>[] { new KeyValuePair<double, Paint.Color>( proportion, topEnd ), new KeyValuePair<double, Paint.Color>( proportion, bottomStart ) } ); }
public HardShadow( Types.Point offset, Paint.Color color ) { if( offset == null ) { throw new ArgumentNullException( "offset" ); } if( color == null ) { throw new ArgumentNullException( "color" ); } _offset = offset; _color = color; }
public SoftShadowModifier( Types.Point offset, double extent, Paint.Color color ) { if( offset == null ) { throw new ArgumentNullException( "offset" ); } if( extent <= 0 ) { throw new ArgumentException( "Extent must be greater than zero.", "extent" ); } if( color == null ) { throw new ArgumentNullException( "color" ); } _offset = offset; _extent = extent; _color = color; }
public SoftShadow( Renderers.Renderer renderer, Types.Point offset, double extent, Paint.Color color ) { if( renderer == null ) { throw new ArgumentNullException( "renderer" ); } if( offset == null ) { throw new ArgumentNullException( "offset" ); } if( extent <= 0 ) { throw new ArgumentException( "Extent must be greater than zero.", "extent" ); } if( color == null ) { throw new ArgumentNullException( "color" ); } _renderer = renderer; _offset = offset; _extent = extent; _color = color; }