MCPcopy Create free account
hub / github.com/IENT/YUView / onZoomRectUpdateOffsetAndZoom

Method onZoomRectUpdateOffsetAndZoom

YUViewLib/src/ui/views/SplitViewWidget.cpp:1099–1109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1097}
1098
1099void splitViewWidget::onZoomRectUpdateOffsetAndZoom(QRectF zoomRect, double additionalZoomFactor)
1100{
1101 const auto newZoom = this->zoomFactor * additionalZoomFactor;
1102 if (newZoom < ZOOMINGLIMIT.min || newZoom > ZOOMINGLIMIT.max)
1103 return;
1104
1105 const auto zoomRectCenterOffset =
1106 zoomRect.center() - this->getMoveOffsetCoordinateSystemOrigin(this->viewZoomingMousePosStart);
1107 this->setMoveOffset((this->moveOffset - zoomRectCenterOffset) * additionalZoomFactor);
1108 this->setZoomFactor(newZoom);
1109}
1110
1111void splitViewWidget::setSplittingPoint(double point, bool setLinkedViews)
1112{

Callers

nothing calls this directly

Calls 3

setMoveOffsetMethod · 0.95
setZoomFactorMethod · 0.95

Tested by

no test coverage detected