diff --git a/ControlElements/AttentionGetter.cs b/ControlElements/AttentionGetter.cs index 7b38ab099..254db2b34 100644 --- a/ControlElements/AttentionGetter.cs +++ b/ControlElements/AttentionGetter.cs @@ -37,6 +37,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading.Tasks; +using static MatterHackers.Agg.Easing; namespace MatterHackers.MatterControl { @@ -96,7 +97,7 @@ namespace MatterHackers.MatterControl time = 1 - (time - 1); } - double lightnessMultiplier = agg_basics.EaseInOutQuad(time); + double lightnessMultiplier = Quadratic.InOut(time); widgetToHighlight.BackgroundColor = startColor.AdjustLightness(1 + lightnessChange * lightnessMultiplier).ToColor(); if (widgetToHighlight.HasBeenClosed || timeSinceStart.Elapsed.TotalSeconds > cycles * pulseTime) diff --git a/PartPreviewWindow/RoundedToggleSwitch.cs b/PartPreviewWindow/RoundedToggleSwitch.cs index ebeb1d932..4d858da37 100644 --- a/PartPreviewWindow/RoundedToggleSwitch.cs +++ b/PartPreviewWindow/RoundedToggleSwitch.cs @@ -34,6 +34,7 @@ using MatterHackers.Agg.Image; using MatterHackers.Agg.UI; using MatterHackers.Agg.VertexSource; using MatterHackers.VectorMath; +using static MatterHackers.Agg.Easing; namespace MatterHackers.MatterControl.CustomWidgets { @@ -122,7 +123,7 @@ namespace MatterHackers.MatterControl.CustomWidgets Color toggleColor = (this.Checked) ? theme.Colors.PrimaryAccentColor : Color.Gray; e.Graphics2D.Circle(position, - finalRadius * agg_basics.EaseOutQuartic(animationRatio), + finalRadius * Quadratic.Out(animationRatio), new Color(toggleColor, 100)); } diff --git a/PartPreviewWindow/View3D/MeshViewerWidget.cs b/PartPreviewWindow/View3D/MeshViewerWidget.cs index 2ec5eca7d..028f6b8af 100644 --- a/PartPreviewWindow/View3D/MeshViewerWidget.cs +++ b/PartPreviewWindow/View3D/MeshViewerWidget.cs @@ -45,6 +45,7 @@ using MatterHackers.RayTracer; using MatterHackers.RenderOpenGl; using MatterHackers.RenderOpenGl.OpenGl; using MatterHackers.VectorMath; +using static MatterHackers.Agg.Easing; namespace MatterHackers.MeshVisualizer { @@ -525,11 +526,11 @@ namespace MatterHackers.MeshVisualizer var accentColor = Color.LightGray; if (secondsSinceSelectionChanged < .25) { - selectionColor = Color.White.Blend(accentColor, agg_basics.EaseInOutQuad(secondsSinceSelectionChanged * 4)); + selectionColor = Color.White.Blend(accentColor, Quadratic.InOut(secondsSinceSelectionChanged * 4)); } else { - selectionColor = accentColor.Blend(Color.White, agg_basics.EaseInOutQuad((secondsSinceSelectionChanged - .25) * 4)); + selectionColor = accentColor.Blend(Color.White, Quadratic.InOut((secondsSinceSelectionChanged - .25) * 4)); } Invalidate(); } diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index af88c2020..a9e3428ee 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit af88c2020bde9ba76fc369ec105ac480b1cb2c25 +Subproject commit a9e3428ee5ae4e21362ba4d4130d29a86daba5dc