A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 lines
1.4 KiB

// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Perspex.Controls;
using Perspex.Media;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace Perspex.Direct2D1.RenderTests.Media
{
public class LinearGradientBrushTests : TestBase
{
public LinearGradientBrushTests() : base(@"Media\LinearGradientBrush")
{
}
[Fact]
public void LinearGradientBrush_RedBlue_Fill()
{
Decorator target = new Decorator
{
Padding = new Thickness(8),
Width = 200,
Height = 200,
Child = new Border
{
Background = new LinearGradientBrush
{
StartPoint = new Point(0, 0.5),
EndPoint = new Point(1, 0.5),
GradientStops =
{
new GradientStop { Color = Colors.Red, Offset = 0 },
new GradientStop { Color = Colors.Blue, Offset = 1 }
}
}
}
};
RenderToFile(target);
CompareImages();
}
}
}