Exemple #1
0
        public GObject Create()
        {
            GObject obj = null;

            switch (type.GeomType)
            {
            case GeomType.Point:
                obj = new GPoint(type, Points[0]);
                break;

            case GeomType.Caption:
                obj = new GCaption(type, Points[0]);
                break;

            case GeomType.Polyline:
                obj = new GPolyline(type, Points);
                break;

            case GeomType.Polygon:
                obj = new GPolygon(type, Points);
                break;
            }
            if (obj != null)
            {
                app.ShowProperties(obj);
            }
            app.Lib.Selection.Clear();
            app.CheckRepaint(this);
            app.UpdateControls();
            return(obj);
        }
Exemple #2
0
        private void ReadText(DXFObject dxf, GType gType)
        {
            Point    pnt  = new Point((int)(dxf.points[0].X * 100.0), (int)(dxf.points[0].Y * 100.0));
            GCaption gobj = new GCaption(gType, pnt);

            gobj.Caption = dxf.text;
            gobj.Angle   = (float)dxf.angle;

            UpdateBounds(pnt);
        }
Exemple #3
0
        void Read(MIFText mp, GType gType)
        {
            Point    pnt  = new Point((int)(mp.point1.X * 100.0), (int)(mp.point1.Y * 100.0));
            GCaption gobj = new GCaption(gType, pnt);

            gobj.Caption = mp.text;
            gobj.Angle   = (float)mp.angle;

//          SetCaption( );
            SetName(gobj);

            UpdateBounds(pnt);
        }