mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added different rendering strategies for fill modes
This commit is contained in:
1 parent
8f073a5d42
commit
022e14e98d
7 files changed
+1318
-47
No files matched your search
@@ -178,6 +178,15 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
// Make the sides even if shift is held down
|
||||
if (Keyboard.IsKeyDown(Key.LeftShift) || Keyboard.IsKeyDown(Key.RightShift) && e.ShapeControlPoint < ShapeControlPoint.TopCenter)
|
||||
{
|
||||
var bounds = _layerEditorService.GetLayerBounds(layer);
|
||||
var smallestSide = Math.Min(bounds.Width * width, bounds.Height * height);
|
||||
width = (float) Math.Round(1.0 / bounds.Width * smallestSide, 2, MidpointRounding.AwayFromZero);
|
||||
height = (float) Math.Round(1.0 / bounds.Height * smallestSide, 2, MidpointRounding.AwayFromZero);
|
||||
}
|
||||
|
||||
layer.ScaleProperty.SetCurrentValue(new SKSize(width, height), ProfileEditorService.CurrentTime);
|
||||
ProfileEditorService.UpdateProfilePreview();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user