IPresentationSurface::SetLetterboxingMargins method (presentation.h)

Sets the size, in visual space, taken by each letterbox area.

Syntax

HRESULT SetLetterboxingMargins(
  float leftLetterboxSize,
  float topLetterboxSize,
  float rightLetterboxSize,
  float bottomLetterboxSize
);

Parameters

leftLetterboxSize

Type: FLOAT

The size of the left margin of the letterbox area.

topLetterboxSize

Type: FLOAT

The size of the top margin of the letterbox area.

rightLetterboxSize

Type: FLOAT

The size of the right margin of the letterbox area.

bottomLetterboxSize

Type: FLOAT

The size of the bottom margin of the letterbox area.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK; otherwise, it returns an HRESULT value that indicates the error.

Remarks

Margins are not affected by the scale component of the transform, but are affected by every other component. Put another way, the margins are applied with the transform applied, but compensate their own size by any scale present in that transform.

Requirements

Requirement Value
Minimum supported client Windows Build 22000
Minimum supported server Windows Build 22000
Header presentation.h
Library dcomp.lib
DLL dcomp.dll