fix(web): CropBounds metadata + Fill-style scaling in compositor — transparent margins preserved, widget fills element rect

This commit is contained in:
2026-09-08 11:17:05 -07:00
parent 5ca9778e23
commit ed9d7c1ffc
3 changed files with 51 additions and 17 deletions
+7
View File
@@ -27,6 +27,13 @@ public sealed class VideoFrame
/// be transparent (static art, web overlays, chat, the social-bar strip).</summary>
public bool IsOpaque { get; init; }
/// <summary>WebSource crop metadata: the alpha bounding box of the widget content
/// within the full canvas (X/Y/W/H in pixels). When set, the compositor uses these
/// bounds for Fill-style scaling (stretch to cover, no aspect preservation) instead
/// of UniformToFill. The transparent margins of the full canvas are preserved so
/// they reveal layers beneath — the crop defines the actual content region.</summary>
public (int X, int Y, int W, int H)? CropBounds { get; init; }
public VideoFrame(int width, int height, byte[] bgraPixels)
{
Width = width;