add DiscreteGeometryKeyFrame
This commit is contained in:
1 parent
a2e719925d
commit
8fa4586c8a
2 files changed
+27
No files matched your search
@@ -0,0 +1,22 @@
|
|||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
|
||||||
|
public class DiscreteGeometryKeyFrame : GeometryKeyFrame
|
||||||
|
{
|
||||||
|
public DiscreteGeometryKeyFrame()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiscreteGeometryKeyFrame(Geometry value) : base(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiscreteGeometryKeyFrame(Geometry value, KeyTime keyTime) : base(value, keyTime)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Freezable CreateInstanceCore() => new DiscreteGeometryKeyFrame();
|
||||||
|
|
||||||
|
protected override Geometry InterpolateValueCore(Geometry baseValue, double keyFrameProgress) => keyFrameProgress < 1.0 ? baseValue : Value;
|
||||||
|
}
|
||||||
@@ -5,6 +5,11 @@ using System.Windows.Media.Animation;
|
|||||||
|
|
||||||
public abstract class GeometryKeyFrame : Freezable, IKeyFrame
|
public abstract class GeometryKeyFrame : Freezable, IKeyFrame
|
||||||
{
|
{
|
||||||
|
protected GeometryKeyFrame()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected GeometryKeyFrame(Geometry value)
|
protected GeometryKeyFrame(Geometry value)
|
||||||
{
|
{
|
||||||
Value = value;
|
Value = value;
|
||||||
|
|||||||
Reference in new issue
Block a user