public void CopyTo(BboxItem dest, double scaleX = 1.0, double scaleY = 1.0) { dest.X = (uint)(scaleX * X); dest.Y = (uint)(scaleY * Y); dest.Width = (uint)(scaleX * Width); dest.Height = (uint)(scaleY * Height); dest.Stroke = Stroke; dest.Name = Name; }
public double DistanceTo2(BboxItem b) { return(Math.Pow(X + Width / 2.0 - b.X - b.Width / 2.0, 2) + Math.Pow(Y + Height / 2.0 - b.Y - b.Height / 2.0, 2)); }