Exemplo n.º 1
0
        public override void ReadProperty()
        {
            switch (Converter.FCode)
            {
            case 2:
                FBlock = Converter.FindBlock(Converter.FValue);
                break;

            case 41:
                Scale.X = Converter.FloatValue();
                break;

            case 42:
                Scale.Y = Converter.FloatValue();
                break;

            case 62:
                color = CADImage.IntToColor(Convert.ToInt32(Converter.FValue, Converter.N));
                break;

            default:
                base.ReadProperty();
                break;
            }
        }
Exemplo n.º 2
0
        public DXFBlock FindBlock(string Name)
        {
            DXFBlock vB = null;

            foreach (DXFBlock vBlock in FBlocks.Entities)
            {
                if (vBlock.Name == Name)
                {
                    vB = vBlock;
                }
            }
            return(vB);
        }
Exemplo n.º 3
0
        public DXFEntity CreateEntity()
        {
            DXFEntity E;

            switch (FValue)
            {
            case "ENDSEC":
                return(null);

            case "ENDBLK":
                return(null);

            case "ENDTAB":
                return(null);

            case "LINE":
                E = new DXFLine();
                break;

            case "SECTION":
                E = new DXFSection();
                break;

            case "BLOCK":
                E = new DXFBlock();
                break;

            case "INSERT":
                E = new DXFInsert();
                break;

            case "TABLE":
                E = new DXFTable();
                break;

            case "CIRCLE":
                E = new DXFCircle();
                break;

            case "LAYER":
                E = new DXFLayer();
                break;

            case "TEXT":
                E = new DXFText();
                break;

            case "MTEXT":
                E = new DXFMText();
                break;

            case "ARC":
                E = new DXFArc();
                break;

            case "ELLIPSE":
                E = new DXFEllipse();
                break;

            default:
                E = new DXFEntity();
                break;
            }
            E.Converter = this;
            return(E);
        }