nateglasser
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
7 additions and
1 deletions
-
src/Avalonia.Base/Rendering/Composition/Drawing/Nodes/RenderDataNodes.cs
|
|
|
@ -78,13 +78,19 @@ interface IRenderDataItem |
|
|
|
bool HitTest(Point p); |
|
|
|
} |
|
|
|
|
|
|
|
class RenderDataCustomNode : IRenderDataItem |
|
|
|
class RenderDataCustomNode : IRenderDataItem, IDisposable |
|
|
|
{ |
|
|
|
public ICustomDrawOperation? Operation { get; set; } |
|
|
|
public bool HitTest(Point p) => Operation?.HitTest(p) ?? false; |
|
|
|
public void Invoke(ref RenderDataNodeRenderContext context) => Operation?.Render(new(context.Context, false)); |
|
|
|
|
|
|
|
public Rect? Bounds => Operation?.Bounds; |
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
Operation?.Dispose(); |
|
|
|
Operation = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
abstract class RenderDataPushNode : IRenderDataItem, IDisposable |
|
|
|
|