private void AddStandardSymbolItemToFigure(JDStruc jdstruc, List <SymbolItemStruc> syDrawingCol)
        {
            for (int i = 0; i < syDrawingCol.Count; i++)
            {
                SymbolItemStruc symbldrawing        = syDrawingCol[i];
                LJJSPoint       sybltopZuoBiaoPt    = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, symbldrawing.depthtop, jdstruc.JDtop, FrameDesign.ValueCoordinate);
                LJJSPoint       syblbottomZuoBiaoPt = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, symbldrawing.depthbottom, jdstruc.JDtop, FrameDesign.ValueCoordinate);
                LJJSPoint       syblpos             = ZuoBiaoOper.GetMidPtBetweenTwoPt(sybltopZuoBiaoPt, syblbottomZuoBiaoPt);

                for (int j = 0; j < symbldrawing.sybolcodelist.Count; j++)
                {
                    double xscale   = 1;
                    double yscale   = 1;
                    string syblcode = symbldrawing.sybolcodelist[j].Trim();
                    if (syblcode != "n" && syblcode != "")
                    {
                        SymbolCodeClass sybloper = (SymbolCodeClass)HashUtil.FindObjByKey(syblcode, FillSymbolCode.SymbolCodeClassHt);
                        if (null == sybloper)
                        {
                            continue;
                        }

                        if (Math.Abs(sybloper.symbolHeigh) > 0.01 && sybloper.ifZXEnlarge)
                        {
                            yscale = Math.Abs(sybltopZuoBiaoPt.YValue - syblbottomZuoBiaoPt.YValue) / sybloper.symbolHeigh;
                        }

                        if ((Math.Abs(sybloper.symbolWidth) > 0.01) && symItemDesignStruc.SyblIfHorFill)
                        {
                            xscale = this.lineRoadEnvironment.LineRoadWidth / sybloper.symbolWidth;
                        }
                        if (symItemDesignStruc.SymbolFramePro == SymbolFrame.DoubleParallel)
                        {
                            Line.BuildCommonHorLineByLayer(sybltopZuoBiaoPt, lineRoadEnvironment.LineRoadWidth, 0, DrawCommonData.DirectionRight);
                            //.AddContinusHorLine(sybltopZuoBiaoPt, lineRoadEnvironment.LineRoadWidth, 0);
                            Line.BuildCommonHorLineByLayer(syblbottomZuoBiaoPt, lineRoadEnvironment.LineRoadWidth, 0, DrawCommonData.DirectionRight);
                        }
                        //    AddJoinAdjustItemObjId(CommonDrawing.InsertSymbolItem(sybloper.symbolcode, xscale, yscale, syblpos));
                        SymbolAdd.InsertBlock(sybloper.symbolcode, xscale, yscale, syblpos);
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void AddYXPouMianToFigure(JDStruc jdstruc, List <SymbolItemStruc> yxpmStrucLst)
        {
            for (int i = 0; i < yxpmStrucLst.Count; i++)
            {
                SymbolItemStruc symbldrawing        = yxpmStrucLst[i];
                LJJSPoint       sybltopZuoBiaoPt    = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, symbldrawing.depthtop, jdstruc.JDtop, FrameDesign.ValueCoordinate);
                LJJSPoint       syblbottomZuoBiaoPt = ZuoBiaoOper.GetJSZuoBiaoPt(jdstruc.JDPtStart, symbldrawing.depthbottom, jdstruc.JDtop, FrameDesign.ValueCoordinate);
                LJJSPoint       syblpos             = ZuoBiaoOper.GetMidPtBetweenTwoPt(sybltopZuoBiaoPt, syblbottomZuoBiaoPt);

                for (int j = 0; j < symbldrawing.sybolcodelist.Count; j++)
                {
                    double xscale   = 1;
                    double yscale   = 1;
                    string syblcode = symbldrawing.sybolcodelist[j].Trim();
                    if (syblcode != "n" && syblcode != "")
                    {
                        SymbolCodeClass sybloper = (SymbolCodeClass)FillSymbolCode.SymbolCodeClassHt[syblcode];
                        if (null == sybloper)
                        {
                            continue;
                        }
                        if (sybloper.ifZXEnlarge)
                        {
                            yscale = Math.Abs(sybltopZuoBiaoPt.YValue - syblbottomZuoBiaoPt.YValue);
                        }
                        else if (sybloper.ifFill)
                        {
                            xscale = sybloper.symbolWidth;
                            yscale = Math.Abs(sybltopZuoBiaoPt.YValue - syblbottomZuoBiaoPt.YValue);
                        }
                        if (sybloper.symbolWidth > 0)
                        {
                            Rect.AddBlackRect(syblbottomZuoBiaoPt, Math.Abs(syblbottomZuoBiaoPt.YValue - sybltopZuoBiaoPt.YValue), sybloper.symbolWidth, 0, new DrawDirection(1, 1));
                        }

                        SymbolAdd.InsertBlock(sybloper.symbolcode, xscale, yscale, syblpos);
                    }
                }
            }
        }