예제 #1
0
        public PropertyText Clone()
        {
            PropertyText p = new PropertyText();

            p.ID            = this.ID;
            p.DefaultZoom   = this.DefaultZoom;
            p.MinZoom       = this.MinZoom;
            p.MaxZoom       = this.MaxZoom;
            p.Name          = this.Name;
            p.LocalPosition = this.LocalPosition;
            p.Font          = this.Font;
            p.Type          = this.Type;
            return(p);
        }
예제 #2
0
        public DrawText(int x, int y, int zoom, TOOL_TYPE type)
            : base()
        {
            property               = new PropertyText();
            property.DefaultZoom   = zoom;
            property.LocalPosition = Global.control.FromLocalToLatLng(x, y);
            property.Type          = type;

            Overlay = Global.control.Overlays.Count - 1;

            Graphics g    = Graphics.FromImage(new Bitmap(1, 1));
            SizeF    size = g.MeasureString(property.Name, property.Font);

            rectangle = new Rectangle(x, y, (int)(size.Width * 1.5), (int)size.Height);

            PointsArray.Add(Global.control.FromLocalToLatLng(x, y));
            PointsArray.Add(Global.control.FromLocalToLatLng(x + rectangle.Width, y));
            PointsArray.Add(Global.control.FromLocalToLatLng(x + rectangle.Width, y + rectangle.Height));
            PointsArray.Add(Global.control.FromLocalToLatLng(x, y + rectangle.Height));

            //SetRectangle(rectangle);
        }