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

23 lines
664 B
C#
Raw Normal View History

// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
2022-01-14 20:22:56 +01:00
// © 2022 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
{
public CenteredBoundingBox(Location center, double width, double height)
{
2018-12-04 00:38:54 +01:00
Center = center;
2022-02-22 22:12:15 +01:00
Width = Math.Max(width, 0d);
Height = Math.Max(height, 0d);
}
2022-02-22 22:12:15 +01:00
public override double Width { get; protected set; }
public override double Height { get; protected set; }
public override Location Center { get; protected set; }
}
}