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 );
        }
Exemplo n.º 2
0
        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 );
        }
Exemplo n.º 3
0
        public Lookup( Primitives.Container container )
        {
            if( container == null )
            {
                throw new ArgumentNullException( "container" );
            }

            Visitor visitor = new Visitor( _mapStyleToItems );

            container.Visit( visitor );
        }
Exemplo n.º 4
0
        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 );
        }
Exemplo n.º 5
0
        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 ) );
            }
        }
Exemplo n.º 6
0
        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 );
        }
Exemplo n.º 7
0
        public void Apply( Primitives.Container container, double multiplier )
        {
            Visitor visitor = new Visitor( multiplier );

            container.Visit( visitor );
        }