[SetBoundsAndZoomFactor]
| 554 | |
| 555 | //! [SetBoundsAndZoomFactor] |
| 556 | void ViewComponent::SetScale(float scale) |
| 557 | { |
| 558 | RECT bounds; |
| 559 | CHECK_FAILURE(m_controller->get_Bounds(&bounds)); |
| 560 | double scaleChange = scale / m_webViewScale; |
| 561 | |
| 562 | bounds.bottom = LONG( |
| 563 | (bounds.bottom - bounds.top) * scaleChange + bounds.top); |
| 564 | bounds.right = LONG( |
| 565 | (bounds.right - bounds.left) * scaleChange + bounds.left); |
| 566 | |
| 567 | m_webViewScale = scale; |
| 568 | m_controller->SetBoundsAndZoomFactor(bounds, scale); |
| 569 | } |
| 570 | //! [SetBoundsAndZoomFactor] |
| 571 | |
| 572 | //! [ResizeWebView] |
nothing calls this directly
no outgoing calls
no test coverage detected