Vixen
02b45cc4
csharp
public static class VideoFit

Works out where a picture goes.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Pure arithmetic over four numbers, in Vixen.Video rather than in whichever renderer needed it first — because both of them need it and they must agree. A video drawn in a scene and the same video drawn in a user interface panel that letterboxed differently would be a difference nobody could explain and nothing could test.

The display aspect is taken separately from the pixel size, which is the whole reason anamorphic content works: a 720×480 clip meant to be shown at 853×480 has square-ish samples that are not square, and fitting it by its sample count squashes it.

Methods (2)

Used by (3)

  • VideoGameVideoPlayback
  • VideoFitTestsVixen.Video.Tests
  • VideoSurfaceUploaderVixen.Video.Rendering