DirectWrite utilities¶
-
namespace dwrite_utils¶
Functions
-
HRESULT create_custom_rendering_params(IDWriteFactory *factory, HMONITOR monitor, DWRITE_RENDERING_MODE rendering_mode, IDWriteRenderingParams **rendering_params)¶
Create DirectWrite rendering params for a monitor and specific rendering options.
- Parameters:
factory – Pre-created DirectWrite factory
monitor – Monitor handle returned by
get_monitor_for_window()rendering_mode – Rendering mode returned by
cui::fonts::rendering_options::rendering_mode()rendering_params – Receives a pointer to the created IDWriteRenderingParams on success
- Returns:
HRESULT indicating success or failure code
-
HMONITOR get_monitor_for_window(HWND wnd)¶
Get the HMONITOR to use with
cui::fonts::create_rendering_params()andcreate_custom_rendering_params()for a given HWND.- Parameters:
wnd – The HWND that is rendering text using DirectWrite
- Returns:
HMONITOR of the root window associated with the HWND, or
nullptron failure
-
HRESULT create_custom_rendering_params(IDWriteFactory *factory, HMONITOR monitor, DWRITE_RENDERING_MODE rendering_mode, IDWriteRenderingParams **rendering_params)¶