| 127 | } |
| 128 | |
| 129 | void |
| 130 | Palette::addStop(unsigned int stop, const QColor &color) |
| 131 | { |
| 132 | unsigned char byte, bit; |
| 133 | |
| 134 | SU_ATTEMPT(stop < SIGDIGGER_PALETTE_MAX_STOPS); |
| 135 | |
| 136 | byte = static_cast<unsigned char>(stop >> 3); |
| 137 | bit = stop & 7; |
| 138 | |
| 139 | this->bitmap[byte] |= 1 << bit; |
| 140 | this->gradient[stop] = color; |
| 141 | } |
| 142 | |
| 143 | void |
| 144 | Palette::deserialize(const Suscan::Object &obj) |