public void Update(double L, double a, double b, Lab.LabComponents labComponent, bool instantTransition) { if (!ColorPicker.TransitionsDisabled) { if (instantTransition) { this.Transition.Easing = new InstantEasing(); } else { this.Transition.Easing = new LinearEasing(); } } this.LabComponent = labComponent; if (this.LAB.L != L || this.LAB.a != a || this.LAB.b != b) { this.LAB = new LAB(L, a, b); } else { Update(L, a, b); } }
public AnimatableLABCanvas(double L, double a, double b, Lab.LabComponents labComponent) { LabImage = new Image() { Width = 96, Height = 96 }; PositionEllipse = new Ellipse(); LabComponent = labComponent; this.LAB = new LAB(L, a, b); if (!ColorPicker.TransitionsDisabled) { this.Transitions = new Transitions(); this.Transition = new LABTransition() { Property = LABProperty, Duration = new TimeSpan(0, 0, 0, 0, 100) }; this.Transitions.Add(Transition); } }