mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-05-07 13:37:47 +00:00
Updated BoundingBox
This commit is contained in:
parent
e8a34b1a9f
commit
8cdc03e411
6 changed files with 27 additions and 127 deletions
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue