MCPcopy Create free account
hub / github.com/MITK/MITK / CheckForCorrectHex

Function CheckForCorrectHex

Modules/Chart/src/QmitkChartWidget.cpp:246–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246std::string CheckForCorrectHex(const std::string &colorName)
247{
248 std::regex rgx("([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})");
249 std::smatch match;
250
251 if (!colorName.empty() && colorName.at(0) != '#' && std::regex_search(colorName.begin(), colorName.end(), match, rgx))
252 {
253 return "#" + colorName;
254 }
255 else
256 {
257 return colorName;
258 }
259}
260
261void QmitkChartWidget::Impl::GetImageUrl()
262{

Callers 1

SetColorMethod · 0.85

Calls 4

atMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected