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

Method setAlpha

qcustomplot/qcustomplot.cpp:25341–25352  ·  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

25339 \see fillAlpha, clearAlpha
25340*/
25341void QCPColorMapData::setAlpha(int keyIndex, int valueIndex, unsigned char alpha)
25342{
25343 if (keyIndex >= 0 && keyIndex < mKeySize && valueIndex >= 0 && valueIndex < mValueSize)
25344 {
25345 if (mAlpha || createAlpha())
25346 {
25347 mAlpha[valueIndex*mKeySize + keyIndex] = alpha;
25348 mDataModified = true;
25349 }
25350 } else
25351 qDebug() << Q_FUNC_INFO << "index out of bounds:" << keyIndex << valueIndex;
25352}
25353
25354/*!
25355 Goes through the data and updates the buffered minimum and maximum data values.

Callers 1

reallocateBufferMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected