|
|
|
@ -20,7 +20,7 @@ namespace Perspex.Direct2D1.RenderTests.Media |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void VisualBrush_Stretch_None() |
|
|
|
public void VisualBrush_Align_TopLeft() |
|
|
|
{ |
|
|
|
Decorator target = new Decorator |
|
|
|
{ |
|
|
|
@ -31,6 +31,8 @@ namespace Perspex.Direct2D1.RenderTests.Media |
|
|
|
{ |
|
|
|
Fill = new VisualBrush |
|
|
|
{ |
|
|
|
AlignmentX = AlignmentX.Left, |
|
|
|
AlignmentY = AlignmentY.Top, |
|
|
|
Stretch = Stretch.None, |
|
|
|
Visual = new Border |
|
|
|
{ |
|
|
|
@ -95,6 +97,45 @@ namespace Perspex.Direct2D1.RenderTests.Media |
|
|
|
this.CompareImages(); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void VisualBrush_Align_BottomRight() |
|
|
|
{ |
|
|
|
Decorator target = new Decorator |
|
|
|
{ |
|
|
|
Padding = new Thickness(8), |
|
|
|
Width = 200, |
|
|
|
Height = 200, |
|
|
|
Child = new Rectangle |
|
|
|
{ |
|
|
|
Fill = new VisualBrush |
|
|
|
{ |
|
|
|
AlignmentX = AlignmentX.Right, |
|
|
|
AlignmentY = AlignmentY.Bottom, |
|
|
|
Stretch = Stretch.None, |
|
|
|
Visual = new Border |
|
|
|
{ |
|
|
|
Width = 92, |
|
|
|
Height = 92, |
|
|
|
Background = Brushes.Red, |
|
|
|
BorderBrush = Brushes.Black, |
|
|
|
BorderThickness = 2, |
|
|
|
Child = new TextBlock |
|
|
|
{ |
|
|
|
Text = "Perspex", |
|
|
|
FontSize = 12, |
|
|
|
FontFamily = "Arial", |
|
|
|
HorizontalAlignment = HorizontalAlignment.Center, |
|
|
|
VerticalAlignment = VerticalAlignment.Center, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
this.RenderToFile(target); |
|
|
|
this.CompareImages(); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void VisualBrush_Stretch_Fill_Large() |
|
|
|
{ |
|
|
|
|