The OpenD Programming Language

ICoreWebView2Controller.SetBoundsAndZoomFactor

Updates Bounds and ZoomFactor properties at the same time. This operation is atomic from the perspective of the host. After returning from this function, the Bounds and ZoomFactor properties are both updated if the function is successful, or neither is updated if the function fails. If Bounds and ZoomFactor are both updated by the same scale (for example, Bounds and ZoomFactor are both doubled), then the page does not display a change in window.innerWidth or window.innerHeight and the WebView renders the content at the new size and zoom without intermediate renderings. This function also updates just one of ZoomFactor or Bounds by passing in the new value for one and the current value for the other.

\snippet ViewComponent.cpp SetBoundsAndZoomFactor

interface ICoreWebView2Controller
HRESULT
SetBoundsAndZoomFactor
(
in RECT bounds
,
in double zoomFactor
)

Meta