D2D1_GAMMA enumeration

Specifies which gamma is used for interpolation.

Syntax


typedef enum  { 
  D2D1_GAMMA_2_2  = 0,
  D2D1_GAMMA_1_0  = 1
} D2D1_GAMMA;

Constants

D2D1_GAMMA_2_2

Interpolation is performed in the standard RGB (sRGB) gamma.

D2D1_GAMMA_1_0

Interpolation is performed in the linear-gamma color space.

Remarks

Interpolating in a linear gamma space (D2D1_GAMMA_1_0) can avoid changes in perceived brightness caused by the effect of gamma correction in spaces where the gamma is not 1.0, such as the default sRGB color space, where the gamma is 2.2. For an example of the differences between these two blending modes, consider the following illustration, which shows two gradients, each of which blends from red to blue to green:

Illustration of two gradients from red to blue to green, blended by using sRGB gamma and linear-gamma

The first gradient is interpolated linearly in the space of the render target (sRGB in this case), and one can see the dark bands between each color. The second gradient uses a gamma-correct linear interpolation, and thus does not exhibit the same variations in brightness.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft