|
|
@ -7,13 +7,46 @@ using System.Collections.Generic; |
|
|
|
|
|
|
|
|
namespace Avalonia.Rendering |
|
|
namespace Avalonia.Rendering |
|
|
{ |
|
|
{ |
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Defines the interface for a renderer.
|
|
|
|
|
|
/// </summary>
|
|
|
public interface IRenderer : IDisposable |
|
|
public interface IRenderer : IDisposable |
|
|
{ |
|
|
{ |
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets or sets a value indicating whether the renderer should draw an FPS counter.
|
|
|
|
|
|
/// </summary>
|
|
|
bool DrawFps { get; set; } |
|
|
bool DrawFps { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets or sets a value indicating whether the renderer should a visual representation
|
|
|
|
|
|
/// of its dirty rectangles.
|
|
|
|
|
|
/// </summary>
|
|
|
bool DrawDirtyRects { get; set; } |
|
|
bool DrawDirtyRects { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Mark a visual as dirty and needing re-rendering.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="visual">The visual.</param>
|
|
|
void AddDirty(IVisual visual); |
|
|
void AddDirty(IVisual visual); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Hit tests a location to find the visuals at the specified point.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="p">The point, in client coordinates.</param>
|
|
|
|
|
|
/// <param name="filter">An optional filter.</param>
|
|
|
|
|
|
/// <returns>The visuals at the specified point, topmost first.</returns>
|
|
|
IEnumerable<IVisual> HitTest(Point p, Func<IVisual, bool> filter); |
|
|
IEnumerable<IVisual> HitTest(Point p, Func<IVisual, bool> filter); |
|
|
void Render(Rect rect); |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Called when a resize notification is received by the control being rendered.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="size">The new size of the window.</param>
|
|
|
|
|
|
void Resized(Size size); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Called when a paint notification is received by the control being rendered.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="rect">The dirty rectangle.</param>
|
|
|
|
|
|
void Paint(Rect rect); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |