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

Method setLevelCount

qcustomplot/qcustomplot.cpp:15830–15842  ·  view source on GitHub ↗

! Sets the number of discretization levels of the color gradient to \a n. The default is 350 which is typically enough to create a smooth appearance. The minimum number of levels is 2. \image html QCPColorGradient-levelcount.png */

Source from the content-addressed store, hash-verified

15828 \image html QCPColorGradient-levelcount.png
15829*/
15830void QCPColorGradient::setLevelCount(int n)
15831{
15832 if (n < 2)
15833 {
15834 qDebug() << Q_FUNC_INFO << "n must be greater or equal 2 but was" << n;
15835 n = 2;
15836 }
15837 if (n != mLevelCount)
15838 {
15839 mLevelCount = n;
15840 mColorBufferInvalidated = true;
15841 }
15842}
15843
15844/*!
15845 Sets at which positions from 0 to 1 which color shall occur. The positions are the keys, the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected