26 lines
761 B
C#
26 lines
761 B
C#
using JD.Kernel.Structs;
|
|
using TeaBox;
|
|
using TeaBox.ObjectModel;
|
|
|
|
namespace JD.Timeline.View.CurveEditor
|
|
{
|
|
static class CurveMemento
|
|
{
|
|
#region Methods
|
|
|
|
public static Range<float> GetCurveTypeViewBound(string curveType)
|
|
{
|
|
float y = PropertyService.PropertyService.Properties.Get($"ZoomCurve{curveType}Y", 0.0f);
|
|
float height = PropertyService.PropertyService.Properties.Get($"ZoomCurve{curveType}Height", 0.0f);
|
|
return new Range<float>(y, height);
|
|
}
|
|
|
|
public static void SetCurveTypeWiewBound(string curveType, Range<float> bound)
|
|
{
|
|
PropertyService.PropertyService.Properties.Set($"ZoomCurve{curveType}Y", bound.Min);
|
|
PropertyService.PropertyService.Properties.Set($"ZoomCurve{curveType}Height", bound.Max);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|