The OpenD Programming Language

ICoreWebView2Controller3.get_RasterizationScale

The rasterization scale for the WebView. The rasterization scale is the combination of the monitor DPI scale and text scaling set by the user. This value should be updated when the DPI scale of the app's top level window changes (i.e. monitor DPI scale changes or window changes monitor) or when the text scale factor of the system changes.

\snippet AppWindow.cpp DPIChanged

\snippet AppWindow.cpp TextScaleChanged1

\snippet AppWindow.cpp TextScaleChanged2

Rasterization scale applies to the WebView content, as well as popups, context menus, scroll bars, and so on. Normal app scaling scenarios should use the ZoomFactor property or SetBoundsAndZoomFactor API which only scale the rendered HTML content and not popups, context menus, scroll bars, and so on.

\snippet ViewComponent.cpp RasterizationScale

interface ICoreWebView2Controller3
@" propget"
HRESULT
get_RasterizationScale
(
double* scale
)

Meta