|
|
@@ -132,6 +132,80 @@ namespace Perspex.Direct2D1.RenderTests.Media
|
|
|
this.CompareImages();
|
|
|
}
|
|
|
|
|
|
+ [Fact]
|
|
|
+ public void VisualBrush_Stretch_Uniform()
|
|
|
+ {
|
|
|
+ Decorator target = new Decorator
|
|
|
+ {
|
|
|
+ Padding = new Thickness(8),
|
|
|
+ Width = 920,
|
|
|
+ Height = 820,
|
|
|
+ Child = new Rectangle
|
|
|
+ {
|
|
|
+ Fill = new VisualBrush
|
|
|
+ {
|
|
|
+ Stretch = Stretch.Uniform,
|
|
|
+ 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_UniformToFill()
|
|
|
+ {
|
|
|
+ Decorator target = new Decorator
|
|
|
+ {
|
|
|
+ Padding = new Thickness(8),
|
|
|
+ Width = 920,
|
|
|
+ Height = 820,
|
|
|
+ Child = new Rectangle
|
|
|
+ {
|
|
|
+ Fill = new VisualBrush
|
|
|
+ {
|
|
|
+ Stretch = Stretch.UniformToFill,
|
|
|
+ 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_Line_Fill()
|
|
|
////{
|