! 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
| 26130 | \see fillAlpha, clearAlpha |
| 26131 | */ |
| 26132 | void 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. |
no outgoing calls
no test coverage detected