Skip to content

Commit e07ada4

Browse files
committed
Create render target with alpha-ignore to ensure ClearType works with Direct2D
1 parent 29b9d20 commit e07ada4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/DrawingCanvas.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ HRESULT DrawingCanvas::CreateRenderTargetsOnDemand(_In_opt_ HDC templateHdc, SIZ
390390
D2D1_RENDER_TARGET_PROPERTIES targetProperties =
391391
D2D1::RenderTargetProperties(
392392
D2D1_RENDER_TARGET_TYPE_SOFTWARE,
393-
D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED), // D2D1_ALPHA_MODE_IGNORE
393+
D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE), // D2D1_ALPHA_MODE_PREMULTIPLIED prevents ClearType.
394394
0,0,
395395
D2D1_RENDER_TARGET_USAGE_NONE
396396
);

0 commit comments

Comments
 (0)