public async Task ConicGradientBrush_DrawingContext() { var brush = new ConicGradientBrush { GradientStops = { new GradientStop { Color = Colors.Red, Offset = 0 }, new GradientStop { Color = Colors.Yellow, Offset = 0.1667 }, new GradientStop { Color = Colors.Lime, Offset = 0.3333 }, new GradientStop { Color = Colors.Aqua, Offset = 0.5000 }, new GradientStop { Color = Colors.Blue, Offset = 0.6667 }, new GradientStop { Color = Colors.Magenta, Offset = 0.8333 }, new GradientStop { Color = Colors.Red, Offset = 1 }, } }; Decorator target = new Decorator { Width = 200, Height = 200, Child = new DrawnControl(c => { c.DrawRectangle(brush, null, new Rect(0, 0, 100, 100)); using (c.PushPreTransform(Matrix.CreateTranslation(100, 100))) c.DrawRectangle(brush, null, new Rect(0, 0, 100, 100)); }), }; await RenderToFile(target); CompareImages(); }
/// <summary> /// Initializes a new instance of the <see cref="ImmutableConicGradientBrush"/> class. /// </summary> /// <param name="source">The brush from which this brush's properties should be copied.</param> public ImmutableConicGradientBrush(ConicGradientBrush source) : base(source) { Center = source.Center; Angle = source.Angle; }