Twilight Princess
Remastered version of the GameCube game
Loading...
Searching...
No Matches
FormatHelper Class Reference

A helper class for working with pixel formats. More...

Static Public Member Functions

static bool ComputePitch (DXGI_FORMAT fmt, int width, int height, ref long rowPitch, ref long slicePitch, CPFlags flags)
 Computes the pitch and slice pitch for a given Format, width, height, and optional flags.
 
static int BitsPerPixel (DXGI_FORMAT fmt)
 Gets the number of bits per pixel for a given Format.
 

Detailed Description

A helper class for working with pixel formats.

Member Function Documentation

◆ BitsPerPixel()

static int FormatHelper.BitsPerPixel ( DXGI_FORMAT fmt)
static

Gets the number of bits per pixel for a given Format.

Parameters
fmtThe Format to get the bits per pixel for.
Returns
The number of bits per pixel for the given format.

◆ ComputePitch()

static bool FormatHelper.ComputePitch ( DXGI_FORMAT fmt,
int width,
int height,
ref long rowPitch,
ref long slicePitch,
CPFlags flags )
static

Computes the pitch and slice pitch for a given Format, width, height, and optional flags.

Parameters
fmtThe Format to compute the pitch for.
widthThe width of the data.
heightThe height of the data.
rowPitchOutput parameter to store the row pitch.
slicePitchOutput parameter to store the slice pitch.
flagsOptional flags to control the pitch computation.
Returns
true if the pitch was computed successfully; false if there was an issue.

The documentation for this class was generated from the following file: