Exemplo n.º 1
0
        private BrushStage[] CreateBrushes( Graphics graphics, Types.Rectangle bounds, Paint.Brushes.Brush brush )
        {
            if( brush == null )
            {
                return new BrushStage[] { };
            }

            BrushVisitor visitor = new BrushVisitor( graphics );

            brush.Visit( bounds, visitor );

            return visitor.GetBrushes();
        }
Exemplo n.º 2
0
            public override void VisitPath( Primitives.Path path )
            {
                base.VisitPath( path );

                PenVisitor penVisitor = new PenVisitor( _multiplier );
                BrushVisitor brushVisitor = new BrushVisitor( _multiplier );

                if( path.Pen != null )
                {
                    path.Pen.Visit( penVisitor );
                    path.Pen = penVisitor.NewPen;
                }
                if( path.Brush != null )
                {
                    path.Brush.Visit( new Types.Rectangle( 0, 0, 0, 0 ), brushVisitor );
                    path.Brush = brushVisitor.NewBrush;
                }
            }