MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / removeSpotColorComponent

Method removeSpotColorComponent

src/core/map_color.cpp:209–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209bool MapColor::removeSpotColorComponent(const MapColor* color)
210{
211 auto size_before = components.size();
212 auto match = [this, color](const SpotColorComponent& scc) { return scc.spot_color == color; };
213 components.erase(std::remove_if(begin(components), end(components), match), end(components));
214 bool changed = components.size() != size_before;
215 if (changed)
216 {
217 if (components.empty())
218 spot_color_method = UndefinedMethod;
219
220 updateCompositionName();
221 updateCalculatedColors();
222 }
223 return changed;
224}
225
226void MapColor::setKnockout(bool flag)
227{

Callers 2

setColorMethod · 0.80
deleteColorMethod · 0.80

Calls 3

eraseMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected