Signitifantly reduced build size

Updated project folder names
Show only selected layer in visualization
Added rectangle support
This commit is contained in:
Robert committed 2019-12-18 13:05:46 +01:00
1 parent b74a1b2871
commit 04bc8f013a
52 files changed
+373 -633

No files matched your search

@@ -1,8 +1,11 @@
using System.IO;
using System.Windows;
using System.Windows.Input;
using Artemis.Core.Models.Profile;
using Artemis.Core.Models.Profile.LayerShapes;
using Artemis.UI.Properties;
using Artemis.UI.Services.Interfaces;
using SkiaSharp.Views.WPF;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
@@ -34,6 +37,22 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
DragRectangle = GetSquareRectBetweenPoints(MouseDownStartPosition, position);
}
public override void MouseUp(object sender, MouseButtonEventArgs e)
{
base.MouseUp(sender, e);
if (ProfileEditorService.SelectedProfileElement is Layer layer)
{
// Ensure the shape is a rectangle
if (!(layer.LayerShape is Rectangle))
layer.LayerShape = new Rectangle(layer);
// Apply the drag rectangle
layer.LayerShape.SetFromUnscaledRectangle(DragRectangle.ToSKRect());
ProfileEditorService.UpdateSelectedProfileElement();
}
}
public override void KeyUp(KeyEventArgs e)
{
base.KeyUp(e);