MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / setAlpha

Method setAlpha

3rdparty/qcustomplot/qcustomplot.cpp:26132–26143  ·  view source on GitHub ↗

! Sets the alpha of the color map cell given by \a keyIndex and \a valueIndex to \a alpha. A value of 0 for \a alpha results in a fully transparent cell, and a value of 255 results in a fully opaque cell. If an alpha map doesn't exist yet for this color map data, it will be created here. If you wish to restore full opacity and free any allocated memory of the alpha map, call \ref clearA

Source from the content-addressed store, hash-verified

26130 \see fillAlpha, clearAlpha
26131*/
26132void QCPColorMapData::setAlpha(int keyIndex, int valueIndex, unsigned char alpha)
26133{
26134 if (keyIndex >= 0 && keyIndex < mKeySize && valueIndex >= 0 && valueIndex < mValueSize)
26135 {
26136 if (mAlpha || createAlpha())
26137 {
26138 mAlpha[valueIndex*mKeySize + keyIndex] = alpha;
26139 mDataModified = true;
26140 }
26141 } else
26142 qDebug() << Q_FUNC_INFO << "index out of bounds:" << keyIndex << valueIndex;
26143}
26144
26145/*!
26146 Goes through the data and updates the buffered minimum and maximum data values.

Callers 2

reallocateBufferMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected