コード例 #1
0
 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;
 }
コード例 #2
0
 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));
 }