Vixen
02b45cc4
csharp
public struct VideoScreenPlacement

Where on the screen an entity's video is drawn.

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

Remarks

Separate from VideoSurface because playing and drawing are separate things. A video with no placement still decodes — which is what a game wants for the one it is about to cut to, and for the one whose sound is playing under a menu — and a placement with no player draws nothing. Adding this component is what puts the picture on the screen.

⚠ Normalised, not pixels, and that is what makes it survive a resize. A cutscene written as (0, 0, 1, 1) is full-screen on every display; the same thing written in pixels is full-screen on the display it was authored on. The Area is a fraction of the target, with the origin at the top left.

Fields and properties (5)

  • public Rectangle Area

    The fraction of the target to draw in. A zero-sized area means the whole of it.

  • public VideoScaling Scaling

    What to do when the picture and the area are different shapes.

  • public uint Order

    Where it sits among the videos on screen, lowest drawn first.

  • public Color4 Tint

    Multiplied into the colour. A default-constructed placement is fully transparent.

  • public static VideoScreenPlacement Opaque

    A placement covering the whole target, untinted.

Used by (1)

  • VideoSurfaceUploaderVixen.Video.Rendering