Пример #1
0
 public void Process(GraphicsConfig graphicsConfig, Graphics graphics)
 {
     ProcessedGraphics.Class731 class731 = new ProcessedGraphics.Class731(this, graphicsConfig, (ProcessedGraphicElementBlock)this, Matrix4D.Identity);
     foreach (IGraphicElement graphicElement in graphics.GraphicElements)
     {
         graphicElement.Accept((IGraphicElementVisitor)class731);
     }
 }
Пример #2
0
            public void Visit(GraphicElementInsert visitee)
            {
                ProcessedGraphicElementBlock second = (ProcessedGraphicElementBlock)null;
                Matrix4D matrix4D = ProcessedGraphics.smethod_1(visitee.InsertCells[0, 0].Transform);

                ProcessedGraphics.Class734 class734;
                if (this.processedGraphics_0.dictionary_2.TryGetValue(visitee.UnclippedBlock, out class734))
                {
                    second = class734.method_0(matrix4D);
                }
                bool flag;

                if (!(flag = second != null))
                {
                    second = new ProcessedGraphicElementBlock(visitee.UnclippedBlock.Transform);
                }
                if (class734 == null)
                {
                    class734 = new ProcessedGraphics.Class734();
                    this.processedGraphics_0.dictionary_2.Add(visitee.UnclippedBlock, class734);
                }
                class734.Blocks.Add(new Pair <Matrix4D, ProcessedGraphicElementBlock>(matrix4D, second));
                ProcessedGraphicElementInsert graphicElementInsert = new ProcessedGraphicElementInsert()
                {
                    UnclippedBlock = second
                };

                if (!flag)
                {
                    GraphicElementInsert.InsertCell insertCell = visitee.InsertCells[0, 0];
                    ProcessedGraphics.Class731      class731   = new ProcessedGraphics.Class731(this.processedGraphics_0, this.graphicsConfig_0, graphicElementInsert.UnclippedBlock, this.matrix4D_0 * insertCell.Transform);
                    foreach (IGraphicElement graphicElement in visitee.UnclippedBlock.GraphicElements)
                    {
                        graphicElement.Accept((IGraphicElementVisitor)class731);
                    }
                }
                int length1 = visitee.InsertCells.GetLength(0);
                int length2 = visitee.InsertCells.GetLength(1);

                graphicElementInsert.InsertCells = new ProcessedGraphicElementInsert.InsertCell[length1, length2];
                for (int index1 = 0; index1 < length1; ++index1)
                {
                    for (int index2 = 0; index2 < length2; ++index2)
                    {
                        GraphicElementInsert.InsertCell insertCell = visitee.InsertCells[index1, index2];
                        graphicElementInsert.InsertCells[index1, index2] = new ProcessedGraphicElementInsert.InsertCell(insertCell.Transform)
                        {
                            ClippedBlock = graphicElementInsert.UnclippedBlock
                        };
                    }
                }
                if (visitee.AttributeBlock != null)
                {
                    ProcessedGraphicElementBlock graphicElementBlock;
                    if (this.processedGraphics_0.dictionary_1.TryGetValue(visitee.AttributeBlock, out graphicElementBlock))
                    {
                        graphicElementInsert.AttributeBlock = graphicElementBlock;
                    }
                    else
                    {
                        graphicElementInsert.AttributeBlock = new ProcessedGraphicElementBlock(visitee.AttributeBlock.Transform);
                        foreach (IGraphicElement graphicElement in visitee.AttributeBlock.GraphicElements)
                        {
                            GraphicElement1 graphicElement1 = graphicElement as GraphicElement1;
                            if (graphicElement1 != null)
                            {
                                graphicElementInsert.AttributeBlock.GraphicElements.Add(graphicElement1);
                            }
                        }
                        this.processedGraphics_0.dictionary_1.Add(visitee.AttributeBlock, graphicElementBlock);
                    }
                    graphicElementInsert.AttributeBlockCells = visitee.AttributeBlockCells;
                }
                this.processedGraphicElementBlock_0.Inserts.Add(graphicElementInsert);
            }