Exemplo n.º 1
0
 public override bool AddEntity(DXFEntity E)
 {
     Entities.Add(E);
     return(E != null);
 }
Exemplo n.º 2
0
 public virtual bool AddEntity(DXFEntity E)
 {
     return(false);
 }
Exemplo n.º 3
0
 public void Loads(DXFEntity E)
 {
     E.Loaded();
 }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
 protected static void DrawEntity(DXFEntity Ent)
 {
     Ent.Draw(FGraphics);
 }
Exemplo n.º 6
0
        public static Color EntColor(DXFEntity E, DXFInsert Ins)
        {
            DXFInsert vIns   = Ins;
            DXFEntity Ent    = E;
            Color     Result = DXFConst.clNone;

            if (Ent is DXFVisibleEntity)
            {
                Result = E.FColor;
            }

            /*if(Ent is Polyline)
             *      Result = ((Polyline)Ent).Pen.Pen.Color;*/
            if (E.layer == null)
            {
                return(Result);
            }
            if ((Result == clByLayer) || (Result == clByBlock))
            {
                if ((vIns == null) || ((Result == clByLayer) && (Ent.layer.name != "0")))
                {
                    if (Result == clByLayer)
                    {
                        if (Ent.layer.color != clNone)
                        {
                            Result = Ent.layer.color;
                        }
                        else
                        {
                            Result = Color.Black;
                        }
                    }
                }
                else
                {
                    while (vIns != null)
                    {
                        Result = vIns.color;
                        if ((Result != clByBlock) && !((Result == clByLayer) &&
                                                       (vIns.layer.name == "0")))
                        {
                            if (Result == clByLayer)
                            {
                                Result = vIns.layer.color;
                            }
                            break;
                        }
                        if ((vIns.owner == null) && (Result == clByLayer))
                        {
                            Result = vIns.layer.color;
                        }
                        vIns = vIns.owner;
                    }
                }
            }
            if ((Result == clByLayer) || (Result == clByBlock))
            {
                Result = clNone;
            }
            return(Result);
        }