StelUtils.cpp   StelUtils.cpp 
skipping to change at line 265 skipping to change at line 265
{ {
return QString("#%1%2%3") return QString("#%1%2%3")
.arg(qMin(255, int(v[0] * 255)), 2, 16, QChar('0')) .arg(qMin(255, int(v[0] * 255)), 2, 16, QChar('0'))
.arg(qMin(255, int(v[1] * 255)), 2, 16, QChar('0')) .arg(qMin(255, int(v[1] * 255)), 2, 16, QChar('0'))
.arg(qMin(255, int(v[2] * 255)), 2, 16, QChar('0')); .arg(qMin(255, int(v[2] * 255)), 2, 16, QChar('0'));
} }
Vec3f htmlColorToVec3f(const QString& c) Vec3f htmlColorToVec3f(const QString& c)
{ {
Vec3f v; Vec3f v;
QRegExp re("^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$"); QRegExp re("^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$");
if (re.exactMatch(c)) if (re.exactMatch(c))
{ {
bool ok; bool ok;
int i = re.capturedTexts().at(1).toInt(&ok, 16); int i = re.capturedTexts().at(1).toInt(&ok, 16);
v[0] = (float)i / 255.; v[0] = (float)i / 255.;
i = re.capturedTexts().at(2).toInt(&ok, 16); i = re.capturedTexts().at(2).toInt(&ok, 16);
v[1] = (float)i / 255.; v[1] = (float)i / 255.;
i = re.capturedTexts().at(3).toInt(&ok, 16); i = re.capturedTexts().at(3).toInt(&ok, 16);
v[2] = (float)i / 255.; v[2] = (float)i / 255.;
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/