D2D1_TEXT_ANTIALIAS_MODE enumeration (d2d1.h)
Describes the antialiasing mode used for drawing text.
Syntax
typedef enum D2D1_TEXT_ANTIALIAS_MODE {
D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0,
D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1,
D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2,
D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3,
D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff
} ;
Constants
D2D1_TEXT_ANTIALIAS_MODE_DEFAULT Value: 0 Use the system default. See Remarks. |
D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE Value: 1 Use ClearType antialiasing. |
D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE Value: 2 Use grayscale antialiasing. |
D2D1_TEXT_ANTIALIAS_MODE_ALIASED Value: 3 Do not use antialiasing. |
D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD Value: 0xffffffff |
Remarks
This enumeration is used with the SetTextAntialiasMode of an ID2D1RenderTarget to specify how text and glyphs are antialiased.
By default, Direct2D renders text in ClearType mode. Factors that
can downgrade the default quality to grayscale or aliased:
- If the DWRITE_RENDERING_MODE value is DWRITE_RENDERING_MODE_ALIASED , then the
default text antialiasing mode is aliased. To change the DirectWrite rendering mode of an ID2D1RenderTarget, use the ID2D1RenderTarget::SetTextRenderingParams method.
- If the DWRITE_RENDERING_MODE value is DWRITE_RENDERING_MODE_OUTLINE, then the default text
antialiasing mode is grayscale.
- If the render target has an alpha channel and is not set to D2D1_ALPHA_MODE_IGNORE, then
the default text antialiasing mode is grayscale.
- If ID2D1RenderTarget::PushLayer is called without D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE
(and the corresponding PopLayer has not been called yet), then the default text
antialiasing mode is grayscale.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps] |
Header | d2d1.h |