D2D1_DISTANTSPECULAR_SCALE_MODE enumeration

The interpolation mode the Distant-specular lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.

Syntax


typedef enum D2D1_DISTANTSPECULAR_SCALE_MODE { 
  D2D1_DISTANTSPECULAR_SCALE_MODE_NEAREST_NEIGHBOR     = 0,
  D2D1_DISTANTSPECULAR_SCALE_MODE_LINEAR               = 1,
  D2D1_DISTANTSPECULAR_SCALE_MODE_CUBIC                = 2,
  D2D1_DISTANTSPECULAR_SCALE_MODE_MULTI_SAMPLE_LINEAR  = 3,
  D2D1_DISTANTSPECULAR_SCALE_MODE_ANISOTROPIC          = 4,
  D2D1_DISTANTSPECULAR_SCALE_MODE_HIGH_QUALITY_CUBIC   = 5
} D2D1_DISTANTSPECULAR_SCALE_MODE;

Constants

D2D1_DISTANTSPECULAR_SCALE_MODE_NEAREST_NEIGHBOR

Samples the nearest single point and uses that. This mode uses less processing time, but outputs the lowest quality image.

D2D1_DISTANTSPECULAR_SCALE_MODE_LINEAR

Uses a four point sample and linear interpolation. This mode outputs a higher quality image than nearest neighbor.

D2D1_DISTANTSPECULAR_SCALE_MODE_CUBIC

Uses a 16 sample cubic kernel for interpolation. This mode uses the most processing time, but outputs a higher quality image.

D2D1_DISTANTSPECULAR_SCALE_MODE_MULTI_SAMPLE_LINEAR

Uses 4 linear samples within a single pixel for good edge anti-aliasing. This mode is good for scaling down by small amounts on images with few pixels.

D2D1_DISTANTSPECULAR_SCALE_MODE_ANISOTROPIC

Uses anisotropic filtering to sample a pattern according to the transformed shape of the bitmap.

D2D1_DISTANTSPECULAR_SCALE_MODE_HIGH_QUALITY_CUBIC

Uses a variable size high quality cubic kernel to perform a pre-downscale the image if downscaling is involved in the transform matrix. Then uses the cubic interpolation mode for the final output.

Requirements

Header

D2d1effects.h

 

 

Show: