IDWriteGlyphRunAnalysis::CreateAlphaTexture method (dwrite.h)

Creates an alpha texture of the specified type for glyphs within a specified bounding rectangle.

Syntax

HRESULT CreateAlphaTexture(
        DWRITE_TEXTURE_TYPE textureType,
  [in]  RECT const          *textureBounds,
  [out] BYTE                *alphaValues,
        UINT32              bufferSize
);

Parameters

textureType

Type: DWRITE_TEXTURE_TYPE

A value that specifies the type of texture requested. This can be DWRITE_TEXTURE_BILEVEL_1x1 or DWRITE_TEXTURE_CLEARTYPE_3x1. If a bi-level texture is requested, the texture contains only bi-level glyphs. Otherwise, the texture contains only antialiased glyphs.

[in] textureBounds

Type: const RECT*

The bounding rectangle of the texture, which can be different than the bounding rectangle returned by GetAlphaTextureBounds.

[out] alphaValues

Type: BYTE*

When this method returns, contains the array of alpha values from the texture. The buffer allocated for this array must be at least the size of bufferSize.

bufferSize

Type: UINT32

The size of the alphaValues array, in bytes. The minimum size depends on the dimensions of the rectangle and the type of texture requested.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

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]
Target Platform Windows
Header dwrite.h
Library Dwrite.lib
DLL Dwrite.dll

See also

IDWriteGlyphRunAnalysis