csharp
public readonly record struct VideoPlacementWhere a picture lands and which part of it is shown.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ Two answers rather than one, because the two scalings need different halves. Contain shrinks the rectangle and leaves the texture coordinates alone; Cover keeps the rectangle and crops the coordinates. A helper that returned only a rectangle could not express the second, and one that returned only coordinates would have to paint the letterbox bars itself — which is wrong the moment the video is drawn over something, because those bars are opaque black over whatever was behind.
Fields and properties (3)
Methods (2)
public VideoPlacement(Rectangle Target, Vector2 TextureScale, Vector2 TextureOffset)Where a picture lands and which part of it is shown.
public static VideoPlacement Filling(Rectangle target)The whole of a rectangle, with the whole of the picture.
Used by (4)
- VideoDrawVixen.Video.Rendering
- VideoFitVixen.Video
- VideoFitTestsVixen.Video.Tests
- VideoSurfaceUploaderVixen.Video.Rendering