本文整理汇总了C++中ofColor::setHsb方法的典型用法代码示例。如果您正苦于以下问题:C++ ofColor::setHsb方法的具体用法?C++ ofColor::setHsb怎么用?C++ ofColor::setHsb使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofColor
的用法示例。
在下文中一共展示了ofColor::setHsb方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: intializeBackground
void GamePanel::intializeBackground() {
last = ofGetElapsedTimeMillis();
col.setHsb(0,255,255);
col2.setHsb(0,255,255);
col3.setHsb(0,255,255);
col4.setHsb(0,255,255);
counter = 0;
}
示例2: parseHsb
void parseHsb(ofColor & color, string attribute) {
double h = m_settings.getAttribute(attribute, "hue", 0.0);
double s = m_settings.getAttribute(attribute, "saturation", 0.0);
double b = m_settings.getAttribute(attribute, "brightness", 0.0);
double a = m_settings.getAttribute(attribute, "alpha", 1.0);
color.setHsb(h * 255.f, s * 255.f, b * 255.f, a * 255.f);
}
示例3: getNoiseAround
//--------------------------------------------------------------
ofColor ColorUtil::getNoiseAround( ofColor c, float radius, float seedValue )
{
float hue, saturation, brightness;
c.getHsb(hue, saturation, brightness);
float noise = (ofNoise(seedValue) * (radius * 2)) - radius;
hue = hue + noise;
if (hue < 0)
hue = 255.0f + hue;
if (hue > 255.0)
hue = hue - 255.0f;
c.setHsb(hue, saturation, brightness);
return (c);
}
示例4: getNoiseAroundMax
//--------------------------------------------------------------
ofColor ColorUtil::getNoiseAroundMax( ofColor c, float radius )
{
float hue, saturation, brightness;
c.getHsb(hue, saturation, brightness);
hue = hue + radius;
if (hue < 0)
hue = 255.0f + hue;
if (hue > 255.0)
hue = hue - 255.0f;
c.setHsb(hue, saturation, brightness);
return (c);
}