public DrawPolygon(int x, int y, int zoom, TOOL_TYPE type) : base() { property = new PropertyPolygon(); property.DefaultZoom = zoom; property.LocalPosition = Global.control.FromLocalToLatLng(x, y); property.Type = type; Overlay = Global.control.Overlays.Count - 1; PointsArray.Add(Global.control.FromLocalToLatLng(x, y)); PointsArray.Add(Global.control.FromLocalToLatLng(x + 30, y)); PointsArray.Add(Global.control.FromLocalToLatLng(x + 30, y + 30)); PointsArray.Add(Global.control.FromLocalToLatLng(x, y + 30)); }
public new PropertyPolygon Clone() { PropertyPolygon p = new PropertyPolygon(); 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.Color = this.Color; p.PenWidth = this.PenWidth; p.Distance = this.Distance; p.Fill = this.Fill; p.Type = this.Type; return(p); }
public DrawEllipse(int x, int y,int zoom, TOOL_TYPE type) : base() { property = new PropertyPolygon(); property.LocalPosition = Global.control.FromLocalToLatLng(x, y); property.DefaultZoom = zoom; property.Type = type; Overlay = Global.control.Overlays.Count - 1; Rectangle rect = new Rectangle(x, y, 40, 40); PointsArray.Add(Global.control.FromLocalToLatLng(x, y)); PointsArray.Add(Global.control.FromLocalToLatLng(x + rect.Width, y)); PointsArray.Add(Global.control.FromLocalToLatLng(x + rect.Width, y + rect.Height)); PointsArray.Add(Global.control.FromLocalToLatLng(x, y + rect.Height)); SetRectangle(rect); }