| 629 | void PDFDocumentView::zoomOut(const QGraphicsView::ViewportAnchor anchor /* = QGraphicsView::AnchorViewCenter */) { zoomBy(2.0/3.0, anchor); } |
| 630 | |
| 631 | void PDFDocumentView::zoomToRect(QRectF a_rect) |
| 632 | { |
| 633 | // NOTE: The argument, `a_rect`, is assumed to be in _scene coordinates_. |
| 634 | fitInView(a_rect, Qt::KeepAspectRatio); |
| 635 | |
| 636 | // Since we passed `Qt::KeepAspectRatio` to `fitInView` both x and y scaling |
| 637 | // factors were changed by the same amount. So we'll just take the x scale to |
| 638 | // be the new `_zoomLevel`. |
| 639 | _zoomLevel = transform().m11(); |
| 640 | emit changedZoom(_zoomLevel); |
| 641 | } |
| 642 | |
| 643 | void PDFDocumentView::zoomFitWindow() |
| 644 | { |