mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
28 lines
772 B
C#
28 lines
772 B
C#
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
|
// © 2022 Clemens Fischer
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
using System;
|
|
|
|
namespace MapControl
|
|
{
|
|
public class CenteredBoundingBox : BoundingBox
|
|
{
|
|
private readonly Location center;
|
|
private readonly double width;
|
|
private readonly double height;
|
|
|
|
public CenteredBoundingBox(Location c, double w, double h)
|
|
{
|
|
center = c;
|
|
width = Math.Max(w, 0d);
|
|
height = Math.Max(h, 0d);
|
|
}
|
|
|
|
public override bool HasValidBounds => false;
|
|
public override Location Center => center;
|
|
public override double Width => width;
|
|
public override double Height => height;
|
|
}
|
|
}
|