mathnode: implemented add/subtract/multiply/divide/power functions

Includes implementing combobox UI for the NodeParamViewWidgetBridge.
This commit is contained in:
itsmattkc
2020-04-15 01:52:24 +10:00
parent fd1ecfae6f
commit a0a7d106dc
15 changed files with 451 additions and 88 deletions
+64
View File
@@ -204,6 +204,70 @@ QColor Color::toQColor() const
return c;
}
const Color &Color::operator+=(const Color &rhs)
{
for (int i=0;i<kRGBAChannels;i++) {
data_[i] += rhs.data_[i];
}
return *this;
}
const Color &Color::operator-=(const Color &rhs)
{
for (int i=0;i<kRGBAChannels;i++) {
data_[i] -= rhs.data_[i];
}
return *this;
}
const Color &Color::operator*=(const float &rhs)
{
for (int i=0;i<kRGBAChannels;i++) {
data_[i] *= rhs;
}
return *this;
}
const Color &Color::operator/=(const float &rhs)
{
for (int i=0;i<kRGBAChannels;i++) {
data_[i] /= rhs;
}
return *this;
}
Color Color::operator+(const Color &rhs) const
{
Color c(*this);
c += rhs;
return c;
}
Color Color::operator-(const Color &rhs) const
{
Color c(*this);
c -= rhs;
return c;
}
Color Color::operator*(const float &rhs) const
{
Color c(*this);
c *= rhs;
return c;
}
Color Color::operator/(const float &rhs) const
{
Color c(*this);
c /= rhs;
return c;
}
OLIVE_NAMESPACE_EXIT
QDebug operator<<(QDebug debug, const OLIVE_NAMESPACE::Color &r)