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

Method mayTraverse

qcustomplot/qcustomplot.cpp:22801–22888  ·  view source on GitHub ↗

! \internal This function is part of the curve optimization algorithm of \ref getCurveLines. This method returns whether a segment going from \a prevRegion to \a currentRegion (see \ref getRegion) may traverse the visible region 5. This function assumes that neither \a prevRegion nor \a currentRegion is 5 itself. If this method returns false, the segment for sure doesn't pass re

Source from the content-addressed store, hash-verified

22799 getTraverse).
22800*/
22801bool QCPCurve::mayTraverse(int prevRegion, int currentRegion) const
22802{
22803 switch (prevRegion)
22804 {
22805 case 1:
22806 {
22807 switch (currentRegion)
22808 {
22809 case 4:
22810 case 7:
22811 case 2:
22812 case 3: return false;
22813 default: return true;
22814 }
22815 }
22816 case 2:
22817 {
22818 switch (currentRegion)
22819 {
22820 case 1:
22821 case 3: return false;
22822 default: return true;
22823 }
22824 }
22825 case 3:
22826 {
22827 switch (currentRegion)
22828 {
22829 case 1:
22830 case 2:
22831 case 6:
22832 case 9: return false;
22833 default: return true;
22834 }
22835 }
22836 case 4:
22837 {
22838 switch (currentRegion)
22839 {
22840 case 1:
22841 case 7: return false;
22842 default: return true;
22843 }
22844 }
22845 case 5: return false; // should never occur
22846 case 6:
22847 {
22848 switch (currentRegion)
22849 {
22850 case 3:
22851 case 9: return false;
22852 default: return true;
22853 }
22854 }
22855 case 7:
22856 {
22857 switch (currentRegion)
22858 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected