public override void Apply( Renderers.Renderer renderer, Primitives.VisualItem item ) { Primitives.DelegateVisitor visitor = new Primitives.DelegateVisitor(); visitor.VisitBoundsMarkerDelegate = delegate( Primitives.BoundsMarker marker ) { Primitives.VisualItem to = CreateItem( marker ); if( to != null ) { to.Style.MergeWith( marker.Style ); } marker.Parent.Replace( marker, to ); }; visitor.VisitPointMarkerDelegate = delegate( Primitives.PointMarker marker ) { Primitives.VisualItem to = CreateItem( marker ); if( to != null ) { to.Style.MergeWith( marker.Style ); } marker.Parent.Replace( marker, to ); }; item.Visit( visitor ); }
public override void Apply( Renderers.Renderer renderer, Primitives.VisualItem item ) { Primitives.DelegateVisitor visitor = new Primitives.DelegateVisitor(); visitor.VisitTextDelegate = delegate( Primitives.Text text ) { Apply( renderer, text ); }; item.Visit( visitor ); }
public Lookup( Primitives.Container container ) { if( container == null ) { throw new ArgumentNullException( "container" ); } Visitor visitor = new Visitor( _mapStyleToItems ); container.Visit( visitor ); }
public override void Apply( Renderers.Renderer renderer, Primitives.VisualItem item ) { Primitives.DelegateVisitor visitor = new Primitives.DelegateVisitor(); visitor.VisitPathDelegate = delegate( Primitives.Path path ) { Apply( renderer, path ); }; item.Visit( visitor ); }
public void Apply( Primitives.Container container ) { List<Primitives.Path> sources = new List<Primitives.Path>(); Primitives.DelegateVisitor visitor = new Primitives.DelegateVisitor(); visitor.VisitPathDelegate = delegate( Primitives.Path path ) { sources.Add( path ); }; container.Visit( visitor ); foreach( Primitives.Path source in sources ) { container.AddFront( Create( source ) ); } }
public void Render( Graphics g, Primitives.Container root ) { if( g == null ) { throw new ArgumentNullException( "g" ); } if( root == null ) { throw new ArgumentNullException( "root" ); } g.SmoothingMode = SmoothingMode.HighQuality; PrimitivesVisitor visitor = new PrimitivesVisitor( this, g ); root.Visit( visitor ); }
public void Apply( Primitives.Container container, double multiplier ) { Visitor visitor = new Visitor( multiplier ); container.Visit( visitor ); }