public PropertyImage Clone() { PropertyImage p = new PropertyImage(); 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.ImageFile = this.imageFile; p.Type = this.Type; return(p); }
public DrawImage(int x, int y, int zoom, TOOL_TYPE type) : base() { property = new PropertyImage(); property.DefaultZoom = zoom; property.Type = type; property.LocalPosition = Global.control.FromLocalToLatLng(x, y); Overlay = Global.control.Overlays.Count - 1; Bitmap bmp = new Bitmap(property.ImageFile); Rectangle rect = new Rectangle(x, y, (int)bmp.Width * 3 / 4, (int)bmp.Height * 3 / 4); 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); }