Updated BoundingBox

This commit is contained in:
Clemens 2022-02-22 22:12:15 +01:00
parent e8a34b1a9f
commit 8cdc03e411
6 changed files with 27 additions and 127 deletions

View file

@ -8,31 +8,15 @@ namespace MapControl
{
public class CenteredBoundingBox : BoundingBox
{
private readonly double width;
private readonly double height;
public CenteredBoundingBox(Location center, double width, double height)
{
Center = center;
this.width = Math.Max(width, 0d);
this.height = Math.Max(height, 0d);
Width = Math.Max(width, 0d);
Height = Math.Max(height, 0d);
}
public Location Center { get; private set; }
public override double Width
{
get { return width; }
}
public override double Height
{
get { return height; }
}
public override BoundingBox Clone()
{
return new CenteredBoundingBox(Center, Width, Height);
}
public override double Width { get; protected set; }
public override double Height { get; protected set; }
public override Location Center { get; protected set; }
}
}