DirectWrite utilities¶
-
namespace dwrite_utils¶
Functions
-
HRESULT create_custom_rendering_params(IDWriteFactory *factory, HMONITOR monitor, DWRITE_RENDERING_MODE rendering_mode, bool force_greyscale_antialiasing, 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()force_greyscale_antialiasing – Flag returned by
cui::fonts::rendering_options::force_greyscale_antialiasing()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
create_custom_rendering_params()for an 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, bool force_greyscale_antialiasing, IDWriteRenderingParams **rendering_params)¶