git-svn-id: svn://db.shs.com.ru/libs@544 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-06-05 08:22:01 +00:00
parent e5e1cf2c24
commit 3044caff92
10 changed files with 112 additions and 84 deletions

View File

@@ -141,8 +141,8 @@ inline float urand(const float & scale = 1.) {return ((float)rand() / RAND_MAX -
inline float uprand(const float & scale = 1.) {return ((float)rand() / RAND_MAX) * scale;}
QString readCharsUntilNull(QDataStream & s);
QString findFile(const QString & file, const QStringList & pathes);
inline QColor operator *(const QColor & c, float v) {return QColor(c.red() * v, c.green() * v, c.blue() * v, c.alpha() * v);}
inline QColor operator /(const QColor & c, float v) {return QColor(c.red() / v, c.green() / v, c.blue() / v, c.alpha() / v);}
inline QColor operator *(const QColor & c, float v) {return QColor(piClamp<int>(c.red() * v, 0, 255), piClamp<int>(c.green() * v, 0, 255), piClamp<int>(c.blue() * v, 0, 255), piClamp<int>(c.alpha() * v, 0, 255));}
inline QColor operator /(const QColor & c, float v) {return QColor(piClamp<int>(c.red() / v, 0, 255), piClamp<int>(c.green() / v, 0, 255), piClamp<int>(c.blue() / v, 0, 255), piClamp<int>(c.alpha() / v, 0, 255));}
//extern __GLWidget__ * currentQGLView;