public override void VisitMove( Primitives.Path.Move move ) { _pos = move.To; _estartpos = _epos = null; _startpos = _lastpos = _pos; _startev = null; _innerPath.Add( new Primitives.Path.Move( move.To ) ); }
public override void VisitLine( Primitives.Path.Line line ) { Types.Vector lv = line.To - _lastpos; Types.Vector ev = new Types.Vector( lv.Y, -lv.X ).Normalize( _softShadow._extent ); if( _epos != null ) { CreateFiller( ev ); } Primitives.Path part = new BinaryComponents.VectorGraphics.Primitives.Path(); part.Add( new Primitives.Path.Move( _lastpos + ev ) ); part.Add( new Primitives.Path.Line( line.To + ev ) ); part.Add( new Primitives.Path.Line( line.To ) ); part.Add( new Primitives.Path.Line( _lastpos ) ); part.Add( new Primitives.Path.Line( _lastpos + ev ) ); part.Add( new Primitives.Path.Close() ); part.Pen = null; Types.Point gstart = line.To, gend = line.To + ev; part.Brush = new Paint.Brushes.LinearGradientBrush ( _softShadow._color, Paint.Color.Transparent, gstart, gend, Paint.Brushes.LinearGradientBrush.RenderHint.NoClip ); _parts.Add( part ); if( _estartpos == null ) { _estartpos = _pos + ev; } if( _startev == null ) { _startev = ev; } _lastpos = _pos = line.To; _epos = _pos + ev; _innerPath.Add( new Primitives.Path.Line( line.To ) ); }