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

Method getAxisRange

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

Source from the content-addressed store, hash-verified

1067}
1068
1069Range<double> PlotViewWidget::getAxisRange(Axis axis, AxisProperties axisProperties) const
1070{
1071 Range<double> range;
1072 const auto lineStartInPlot = this->convertPixelPosToPlotPos(axisProperties.line.p1());
1073 range.min = (axis == Axis::X) ? lineStartInPlot.x() : lineStartInPlot.y();
1074 auto lineEndInPlot = this->convertPixelPosToPlotPos(axisProperties.line.p2());
1075 range.max = (axis == Axis::X) ? lineEndInPlot.x() : lineEndInPlot.y();
1076 return range;
1077}
1078
1079QRectF PlotViewWidget::getMaxLabelDrawSize(QPainter & painter,
1080 Axis axis,

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected