Exemplo n.º 1
0
        public static void CreateDrawables(
            IWireframeGraphicsFactory2 graphicsFactory,
            GraphicsConfig graphicsConfig,
            DxfModel model,
            IList <DxfEntity> modelSpaceEntities,
            IList <DxfEntity> paperSpaceEntities,
            DxfLayout layout,
            ICollection <DxfViewport> viewports)
        {
            if (viewports == null)
            {
                viewports = (ICollection <DxfViewport>)layout.Viewports;
            }
            bool flag;

            if (flag = (layout.PlotLayoutFlags & PlotLayoutFlags.DrawViewportsFirst) != PlotLayoutFlags.None)
            {
                WireframeGraphicsFactory2Util.smethod_1(graphicsFactory, graphicsConfig, model, modelSpaceEntities, layout, viewports);
            }
            using (DrawContext.Wireframe.PaperToPaperSpace paperToPaperSpace = new DrawContext.Wireframe.PaperToPaperSpace(model, layout, graphicsConfig, Matrix4D.Identity))
            {
                foreach (DxfEntity paperSpaceEntity in (IEnumerable <DxfEntity>)paperSpaceEntities)
                {
                    paperSpaceEntity.Draw((DrawContext.Wireframe)paperToPaperSpace, graphicsFactory);
                }
            }
            if (flag)
            {
                return;
            }
            WireframeGraphicsFactory2Util.smethod_1(graphicsFactory, graphicsConfig, model, modelSpaceEntities, layout, viewports);
        }
Exemplo n.º 2
0
 public static void CreateDrawables(
     IWireframeGraphicsFactory2 graphicsFactory,
     GraphicsConfig graphicsConfig,
     DxfModel model,
     DxfLayout layout,
     ICollection <DxfViewport> viewports)
 {
     if (layout.PaperSpace)
     {
         if (viewports == null)
         {
             viewports = (ICollection <DxfViewport>)layout.Viewports;
         }
         bool flag;
         if (flag = (layout.PlotLayoutFlags & PlotLayoutFlags.DrawViewportsFirst) != PlotLayoutFlags.None)
         {
             WireframeGraphicsFactory2Util.smethod_0(graphicsFactory, graphicsConfig, model, layout, (IEnumerable <DxfViewport>)viewports);
         }
         using (DrawContext.Wireframe.PaperToPaperSpace paperToPaperSpace = new DrawContext.Wireframe.PaperToPaperSpace(model, layout, graphicsConfig, Matrix4D.Identity))
             layout.Draw((DrawContext.Wireframe)paperToPaperSpace, graphicsFactory);
         if (flag)
         {
             return;
         }
         WireframeGraphicsFactory2Util.smethod_0(graphicsFactory, graphicsConfig, model, layout, (IEnumerable <DxfViewport>)viewports);
     }
     else
     {
         WireframeGraphicsFactory2Util.CreateDrawables(graphicsFactory, graphicsConfig, model, Matrix4D.Identity);
     }
 }
Exemplo n.º 3
0
        public void GetBounds(
            DxfModel model,
            DxfLayout layout,
            ICollection <DxfViewport> viewports,
            Matrix4D postTransform)
        {
            if (viewports == null)
            {
                viewports = (ICollection <DxfViewport>)layout.Viewports;
            }
            IWireframeGraphicsFactory graphicsFactory = this.CreateGraphicsFactory();

            using (DrawContext.Wireframe.PaperToPaperSpace paperToPaperSpace = new DrawContext.Wireframe.PaperToPaperSpace(layout.Model, layout, this.graphicsConfig_0, postTransform))
            {
                foreach (DxfEntity entity in (DxfHandledObjectCollection <DxfEntity>)layout.Entities)
                {
                    entity.Draw((DrawContext.Wireframe)paperToPaperSpace, graphicsFactory);
                }
                layout.DrawFrame((DrawContext.Wireframe)paperToPaperSpace, graphicsFactory);
            }
            foreach (DxfViewport viewport in (IEnumerable <DxfViewport>)viewports)
            {
                if (viewport.ModelSpaceVisible)
                {
                    using (DrawContext.Wireframe.ModelToPaperSpace modelToPaperSpace = new DrawContext.Wireframe.ModelToPaperSpace(layout.Model, layout, this.graphicsConfig_0, viewport, postTransform))
                    {
                        foreach (DxfEntity entity in (DxfHandledObjectCollection <DxfEntity>)model.Entities)
                        {
                            entity.Draw((DrawContext.Wireframe)modelToPaperSpace, graphicsFactory);
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
 public override DrawContext.Wireframe CreateChildContext(
     DxfEntity blockContext,
     Matrix4D preTransform)
 {
     DrawContext.Wireframe.PaperToPaperSpace paperToPaperSpace = new DrawContext.Wireframe.PaperToPaperSpace(this);
     paperToPaperSpace.SetParent((DrawContext)this, blockContext);
     paperToPaperSpace.clippingTransformerChain_0.SetPreTransform(preTransform);
     return((DrawContext.Wireframe)paperToPaperSpace);
 }
Exemplo n.º 5
0
 public void GetBounds(
     DxfModel model,
     DxfLayout layout,
     DxfEntity paperSpaceEntity,
     Matrix4D postTransform)
 {
     using (DrawContext.Wireframe.PaperToPaperSpace paperToPaperSpace = new DrawContext.Wireframe.PaperToPaperSpace(layout.Model, layout, this.graphicsConfig_0, postTransform))
         paperSpaceEntity.Draw((DrawContext.Wireframe)paperToPaperSpace, this.CreateGraphicsFactory());
 }
Exemplo n.º 6
0
 private PaperToPaperSpace(DrawContext.Wireframe.PaperToPaperSpace from)
     : base((DrawContext.Wireframe)from)
 {
 }