MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / addStop

Method addStop

Misc/Palette.cpp:129–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void
130Palette::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
143void
144Palette::deserialize(const Suscan::Object &obj)

Callers 1

deserializeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected