Browse Source
use internal keyspline as backing field to save memory.
pull/4180/head
Jumar Macato
6 years ago
No known key found for this signature in database
GPG Key ID: B19884DAC3A5BF3F
1 changed files with
9 additions and
17 deletions
-
src/Avalonia.Animation/Easing/SplineEasing.cs
|
|
@ -11,56 +11,48 @@ namespace Avalonia.Animation.Easings |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// X coordinate of the first control point
|
|
|
/// X coordinate of the first control point
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private double _x1; |
|
|
|
|
|
public double X1 |
|
|
public double X1 |
|
|
{ |
|
|
{ |
|
|
get => _x1; |
|
|
get => _internalKeySpline.ControlPointX1; |
|
|
set |
|
|
set |
|
|
{ |
|
|
{ |
|
|
_x1 = value; |
|
|
_internalKeySpline.ControlPointX1 = value; |
|
|
_internalKeySpline.ControlPointX1 = _x1; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Y coordinate of the first control point
|
|
|
/// Y coordinate of the first control point
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private double _y1; |
|
|
|
|
|
public double Y1 |
|
|
public double Y1 |
|
|
{ |
|
|
{ |
|
|
get => _y1; |
|
|
get => _internalKeySpline.ControlPointY1; |
|
|
set |
|
|
set |
|
|
{ |
|
|
{ |
|
|
_y1 = value; |
|
|
_internalKeySpline.ControlPointY1 = value; |
|
|
_internalKeySpline.ControlPointY1 = _y1; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// X coordinate of the second control point
|
|
|
/// X coordinate of the second control point
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private double _x2; |
|
|
|
|
|
public double X2 |
|
|
public double X2 |
|
|
{ |
|
|
{ |
|
|
get => _x2; |
|
|
get => _internalKeySpline.ControlPointX2; |
|
|
set |
|
|
set |
|
|
{ |
|
|
{ |
|
|
_x2 = value; |
|
|
_internalKeySpline.ControlPointX2 = value; |
|
|
_internalKeySpline.ControlPointX2 = _x2; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Y coordinate of the second control point
|
|
|
/// Y coordinate of the second control point
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private double _y2; |
|
|
|
|
|
public double Y2 |
|
|
public double Y2 |
|
|
{ |
|
|
{ |
|
|
get => _y2; |
|
|
get => _internalKeySpline.ControlPointY2; |
|
|
set |
|
|
set |
|
|
{ |
|
|
{ |
|
|
_y2 = value; |
|
|
_internalKeySpline.ControlPointY2 = value; |
|
|
_internalKeySpline.ControlPointY2 = _y2; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|