MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / rectIntersectsLine

Method rectIntersectsLine

qcustomplot/qcustomplot.cpp:28046–28058  ·  view source on GitHub ↗

! \internal Returns whether \a line intersects (or is contained in) \a pixelRect. \a line is assumed to be either perfectly horizontal or perfectly vertical, as is the case for error bar lines. */

Source from the content-addressed store, hash-verified

28044 error bar lines.
28045*/
28046bool QCPErrorBars::rectIntersectsLine(const QRectF &pixelRect, const QLineF &line) const
28047{
28048 if (pixelRect.left() > line.x1() && pixelRect.left() > line.x2())
28049 return false;
28050 else if (pixelRect.right() < line.x1() && pixelRect.right() < line.x2())
28051 return false;
28052 else if (pixelRect.top() > line.y1() && pixelRect.top() > line.y2())
28053 return false;
28054 else if (pixelRect.bottom() < line.y1() && pixelRect.bottom() < line.y2())
28055 return false;
28056 else
28057 return true;
28058}
28059/* end of 'src/plottables/plottable-errorbar.cpp' */
28060
28061

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected