protected override MutableObject Mutate(MutableObject mutable) { foreach (var entry in ColorScope.GetEntries(mutable)) { ColorTarget.SetValue(ColorLerp(mutable, FromColor.GetValue(entry), ToColor.GetValue(entry), Proportion.GetValue(entry)), entry); } return(mutable); }
public override void Draw(BaseScreen.Resources screenResources, SmartSpriteBatch spriteBatch, ScreenAbstractor screen, float opacity, FloatRectangle?clip = null, Texture2D bgTexture = null, Vector2?scrollOffset = null) { // if (approxPoints == null) if (Points == null || Points.Value() == null) { return; } SetPoints(Points.Value()); var drawPoints = approxPoints.Select(screen.Translate).ToArray(); if (ToColor.HasValue()) { spriteBatch.DrawLine(drawPoints, Color.Value(), ToColor.Value(), null, BrushSize.Value); } else { spriteBatch.DrawLine(drawPoints, Color.Value(), null, BrushSize.Value); } }