Browse Source

Added in-tree visual brush test.

Expected output is slightly wonky - need to investigate that once
stuff's working in general.
scenegraph-after-breakage
Steven Kirk 10 years ago
parent
commit
24635ea218
  1. 36
      tests/Avalonia.RenderTests/Media/VisualBrushTests.cs
  2. BIN
      tests/TestFiles/Direct2D1/Media/VisualBrush/VisualBrush_InTree_Visual.expected.png

36
tests/Avalonia.RenderTests/Media/VisualBrushTests.cs

@ -425,5 +425,41 @@ namespace Avalonia.Direct2D1.RenderTests.Media
RenderToFile(target);
CompareImages();
}
[Fact]
public void VisualBrush_InTree_Visual()
{
TextBlock source;
Decorator target = new Decorator
{
Padding = new Thickness(8),
Width = 200,
Height = 200,
Child = new Grid
{
RowDefinitions = new RowDefinitions("Auto,*"),
Children =
{
(source = new TextBlock
{
HorizontalAlignment = HorizontalAlignment.Left,
Text = "Visual"
}),
new Rectangle
{
Fill = new VisualBrush
{
Stretch = Stretch.Uniform,
Visual = source,
},
[Grid.RowProperty] = 1,
}
}
}
};
RenderToFile(target);
CompareImages();
}
}
}

BIN
tests/TestFiles/Direct2D1/Media/VisualBrush/VisualBrush_InTree_Visual.expected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Loading…
Cancel
Save