The OpenD Programming Language

ICoreWebView2Controller3.get_BoundsMode

BoundsMode affects how setting the Bounds and RasterizationScale properties work. Bounds mode can either be in COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS mode or COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE mode.

When the mode is in COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS, setting the bounds property will set the size of the WebView in raw screen pixels. Changing the rasterization scale in this mode won't change the raw pixel size of the WebView and will only change the rasterization scale.

When the mode is in COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE, setting the bounds property will change the logical size of the WebView which can be described by the following equation:

Logical size * rasterization scale = Raw Pixel size

In this case, changing the rasterization scale will keep the logical size the same and change the raw pixel size.

\snippet ViewComponent.cpp BoundsMode

interface ICoreWebView2Controller3
@" propget"
HRESULT
get_BoundsMode
(
COREWEBVIEW2_BOUNDS_MODE* boundsMode
)

Meta