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

Method drawZoomRect

YUViewLib/src/ui/views/PlotViewWidget.cpp:889–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

887}
888
889void PlotViewWidget::drawZoomRect(QPainter &painter) const
890{
891 if (this->viewAction != ViewAction::ZOOM_RECT)
892 return;
893
894 if (!this->fixYAxis)
895 {
896 MoveAndZoomableView::drawZoomRect(painter);
897 return;
898 }
899
900 auto yTop = this->plotRect.top() + fadeBoxThickness;
901 auto yBottom = this->plotRect.bottom() - fadeBoxThickness;
902 const auto mouseRect = QRectF(QPointF(viewZoomingMousePosStart.x(), yTop),
903 QPointF(viewZoomingMousePos.x(), yBottom));
904
905 painter.setPen(ZOOM_RECT_PEN);
906 painter.setBrush(ZOOM_RECT_BRUSH);
907 painter.drawRect(mouseRect);
908}
909
910void PlotViewWidget::updatePlotRectAndAxis(QPainter &painter)
911{

Callers 2

paintEventMethod · 0.95
paintEventMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected