Browse Source
`VisualBrush`es need to get delegated back to the renderer for rendering, so added an `IVisualBrushRenderer` interface which is implemented by the renderers, and pass this when creating drawing contexts. Only currently implemented/tested for D2D and `ImmediateRenderer`.scenegraph-after-breakage
28 changed files with 151 additions and 62 deletions
@ -0,0 +1,19 @@ |
|||
using System; |
|||
using Avalonia.Media; |
|||
|
|||
namespace Avalonia.Rendering |
|||
{ |
|||
/// <summary>
|
|||
/// Defines a renderer used to render a visual brush to a bitmap.
|
|||
/// </summary>
|
|||
public interface IVisualBrushRenderer |
|||
{ |
|||
/// <summary>
|
|||
/// Renders a visual brush to a bitmap.
|
|||
/// </summary>
|
|||
/// <param name="context">The drawing context to render to.</param>
|
|||
/// <param name="brush">The visual brush.</param>
|
|||
/// <returns>A bitmap containing the rendered brush.</returns>
|
|||
void RenderVisualBrush(IDrawingContextImpl context, VisualBrush brush); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue