DCOMPOSITION_BORDER_MODE Enumeration

Specifies the border mode to use when composing a bitmap or applying a clip with any transform such that the edges of the bitmap or clip are not axis-aligned with integer coordinates.

Syntax

typedef enum DCOMPOSITION_BORDER_MODE {
  DCOMPOSITION_BORDER_MODE_SOFT,
  DCOMPOSITION_BORDER_MODE_HARD,
  DCOMPOSITION_BORDER_MODE_INHERIT
} ;

Constants

DCOMPOSITION_BORDER_MODE_SOFT Bitmap and clip edges are antialiased.
DCOMPOSITION_BORDER_MODE_HARD Bitmap and clip edges are aliased. See Remarks.
DCOMPOSITION_BORDER_MODE_INHERIT Bitmap and clip edges are drawn according to the mode established by the parent visual.

Remarks

The default border mode for any given visual is DCOMPOSITION_BORDER_MODE_INHERIT, which delegates the determination of the border mode to the parent visual. If all visuals in a visual tree specify this mode, the default for all visuals is aliased rendering, which is the fastest mode.

A single visual can have any combination of visual properties. However, if a visual has the following combination of properties, the borders of the visual will default to DCOMPOSITION_BORDER_MODE_HARD.

  • SetCompositeMode(DCOMPOSITION_COMPOSITE_MODE_DESTINATION_INVERT)
  • SetBorderMode(DCOMPOSITION_BORDER_MODE_SOFT)
  • SetBitmapInterpolationMode(DCOMPOSITION_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR)
If you want a visual to be drawn with antialiasing, use DCOMPOSITION_BITMAP_INTERPOLATION_MODE_LINEAR for the content of the visual, and DCOMPOSITION_BORDER_MODE_SOFT for the edges.

Requirements

   
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Header dcomptypes.h

See Also

IDCompositionVisual::SetBorderMode