RGB.NET - Updated for latest development branch

This commit is contained in:
Robert committed 2021-02-10 00:19:45 +01:00
1 parent 606c1b80f2
commit 7792b662e0
8 files changed
+23 -12

No files matched your search

@@ -300,7 +300,7 @@ namespace Artemis.Core
internal void CalculateRenderProperties()
{
Rectangle = RgbDevice.DeviceRectangle.ToSKRect();
Rectangle = RgbDevice.Boundary.ToSKRect();
if (!Leds.Any())
return;
@@ -46,10 +46,12 @@ namespace Artemis.Core
private set => SetAndNotify(ref _absoluteRectangle, value);
}
public ArtemisLedLayout? Layout { get; set; }
internal void CalculateRectangles()
{
Rectangle = RgbLed.LedRectangle.ToSKRect();
AbsoluteRectangle = RgbLed.AbsoluteLedRectangle.ToSKRect();
Rectangle = RgbLed.Boundary.ToSKRect();
AbsoluteRectangle = RgbLed.AbsoluteBoundary.ToSKRect();
}
/// <inheritdoc />
@@ -0,0 +1,10 @@
using System;
namespace Artemis.Core
{
public class ArtemisLedLayout
{
public ArtemisLed Led { get; set; }
public Uri Image { get; set; }
}
}
@@ -66,7 +66,7 @@ namespace Artemis.Core.Services.Models
{
HorizontalArrangementPosition.Left => devices.Min(d => d.RgbDevice.Location.X) - (AppliedConfiguration?.MarginLeft ?? 0.0),
HorizontalArrangementPosition.Right => devices.Max(d => d.RgbDevice.Location.X + d.RgbDevice.Size.Width) + (AppliedConfiguration?.MarginRight ?? 0.0),
HorizontalArrangementPosition.Center => devices.First().RgbDevice.DeviceRectangle.Center.X,
HorizontalArrangementPosition.Center => devices.First().RgbDevice.Boundary.Center.X,
HorizontalArrangementPosition.Equal => devices.First().RgbDevice.Location.X,
_ => throw new ArgumentOutOfRangeException(nameof(horizontalPosition), horizontalPosition, null)
};
@@ -74,7 +74,7 @@ namespace Artemis.Core.Services.Models
{
VerticalArrangementPosition.Top => devices.Min(d => d.RgbDevice.Location.Y) - (AppliedConfiguration?.MarginTop ?? 0.0),
VerticalArrangementPosition.Bottom => devices.Max(d => d.RgbDevice.Location.Y + d.RgbDevice.Size.Height) + (AppliedConfiguration?.MarginBottom ?? 0.0),
VerticalArrangementPosition.Center => devices.First().RgbDevice.DeviceRectangle.Center.Y,
VerticalArrangementPosition.Center => devices.First().RgbDevice.Boundary.Center.Y,
VerticalArrangementPosition.Equal => devices.First().RgbDevice.Location.Y,
_ => throw new ArgumentOutOfRangeException(nameof(verticalPosition), verticalPosition, null)
};