MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / color

Method color

src/openms_gui/source/VISUAL/MultiGradient.cpp:84–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 QColor MultiGradient::color(UInt index)
85 {
86 if (index > size() - 1)
87 {
88 throw IndexOverflow(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION);
89 }
90
91 map<double, QColor>::iterator it = pos_col_.begin();
92 for (Size i = 0; i < index; ++i)
93 {
94 ++it;
95 }
96 return it->second;
97 }
98
99 QColor MultiGradient::interpolatedColorAt(double position) const
100 {

Callers 7

invalidate_Method · 0.80
paintEventMethod · 0.80
mousePressEventMethod · 0.80
mouseDoubleClickEventMethod · 0.80
drawMethod · 0.80
drawBoundingBox_Method · 0.80

Calls 2

sizeFunction · 0.50
beginMethod · 0.45

Tested by

no test coverage detected