csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
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.
45 lines
1.3 KiB
45 lines
1.3 KiB
// -----------------------------------------------------------------------
|
|
// <copyright file="PathTests.cs" company="Steven Kirk">
|
|
// Copyright 2014 MIT Licence. See licence.md for more information.
|
|
// </copyright>
|
|
// -----------------------------------------------------------------------
|
|
|
|
namespace Perspex.Direct2D1.RenderTests.Shapes
|
|
{
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using Perspex.Controls;
|
|
using Perspex.Layout;
|
|
using Perspex.Media;
|
|
using Perspex.Shapes;
|
|
|
|
[TestClass]
|
|
public class PathTests : TestBase
|
|
{
|
|
public PathTests()
|
|
: base(@"Shapes\Path")
|
|
{
|
|
}
|
|
|
|
[TestMethod]
|
|
public void Path_100px_Triangle_Centered()
|
|
{
|
|
Decorator target = new Decorator
|
|
{
|
|
Width = 200,
|
|
Height = 200,
|
|
Content = new Path
|
|
{
|
|
Fill = Brushes.Gray,
|
|
Stroke = Brushes.Red,
|
|
StrokeThickness = 2,
|
|
HorizontalAlignment = HorizontalAlignment.Center,
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
Data = StreamGeometry.Parse("M 0,100 L 100,100 50,0 Z"),
|
|
}
|
|
};
|
|
|
|
this.RenderToFile(target);
|
|
this.CompareImages();
|
|
}
|
|
}
|
|
}
|
|
|