2017-06-25 23:05:48 +02:00
|
|
|
|
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
2022-01-14 20:22:56 +01:00
|
|
|
|
// © 2022 Clemens Fischer
|
2017-06-25 23:05:48 +02:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
2018-12-20 21:55:12 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
|
2017-06-25 23:05:48 +02:00
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
|
|
|
|
|
public class CenteredBoundingBox : BoundingBox
|
|
|
|
|
|
{
|
2022-12-07 22:29:08 +01:00
|
|
|
|
private readonly Location center;
|
|
|
|
|
|
private readonly double width;
|
|
|
|
|
|
private readonly double height;
|
|
|
|
|
|
|
|
|
|
|
|
public CenteredBoundingBox(Location c, double w, double h)
|
2017-06-25 23:05:48 +02:00
|
|
|
|
{
|
2022-12-07 22:29:08 +01:00
|
|
|
|
center = c;
|
|
|
|
|
|
width = Math.Max(w, 0d);
|
|
|
|
|
|
height = Math.Max(h, 0d);
|
2017-06-25 23:05:48 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-12-08 15:05:19 +01:00
|
|
|
|
public override bool HasValidBounds => false;
|
2022-12-07 22:29:08 +01:00
|
|
|
|
public override Location Center => center;
|
|
|
|
|
|
public override double Width => width;
|
|
|
|
|
|
public override double Height => height;
|
2017-06-25 23:05:48 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|