XAML-Map-Control/MapControl/Shared/CenteredBoundingBox.cs

23 lines
629 B
C#
Raw Normal View History

// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
2024-02-03 21:01:53 +01:00
// Copyright © 2024 Clemens Fischer
// Licensed under the Microsoft Public License (Ms-PL)
2018-12-20 21:55:12 +01:00
using System;
namespace MapControl
{
public class CenteredBoundingBox : BoundingBox
{
2024-08-29 21:35:58 +02:00
public CenteredBoundingBox(Location center, double width, double height)
{
2024-08-29 21:35:58 +02:00
Center = center;
Width = Math.Max(width, 0d);
Height = Math.Max(height, 0d);
}
2024-08-29 23:56:29 +02:00
public override Location Center { get; }
2024-08-29 21:35:58 +02:00
public override double Width { get; }
public override double Height { get; }
}
}