Adding more possibilities to the ColorProvider class

This commit is contained in:
Hombre
2014-06-14 15:18:25 +02:00
parent 7d981c4a0a
commit 02240ae504
18 changed files with 88 additions and 26 deletions

View File

@@ -104,7 +104,7 @@ void ColoredBar::draw() {
double y_ = double((h-1)-y);
double x01 = x_ /double(w-1);
double y01 = double(y)/double(h-1);
colorProvider->colorForValue (x01, y01, colorCallerId, this);
colorProvider->colorForValue (x01, y01, CCET_BACKGROUND, colorCallerId, this);
cr->set_source_rgb(ccRed, ccGreen, ccBlue);
cr->rectangle(x_, y_, 1., 1.);
cr->fill();
@@ -118,7 +118,7 @@ void ColoredBar::draw() {
double y_ = double((h-1)-y);
double x01 = double(x)/double(w-1);
double y01 = double(y)/double(h-1);
colorProvider->colorForValue (x01, y01, colorCallerId, this);
colorProvider->colorForValue (x01, y01, CCET_BACKGROUND, colorCallerId, this);
cr->set_source_rgb(ccRed, ccGreen, ccBlue);
cr->rectangle(x_, y_, 1., 1.);
cr->fill();
@@ -132,7 +132,7 @@ void ColoredBar::draw() {
double y_ = double((h-1)-y);
double x01 = double(x)/double(w-1);
double y01 = double(y)/double(h-1);
colorProvider->colorForValue (y01, x01, colorCallerId, this);
colorProvider->colorForValue (y01, x01, CCET_BACKGROUND, colorCallerId, this);
cr->set_source_rgb(ccRed, ccGreen, ccBlue);
cr->rectangle(x_, y_, 1., 1.);
cr->fill();
@@ -147,7 +147,7 @@ void ColoredBar::draw() {
double y_ = double( y);
double x01 = x_/double(w-1);
double y01 = y_/double(h-1);
colorProvider->colorForValue (y01, x01, colorCallerId, this);
colorProvider->colorForValue (y01, x01, CCET_BACKGROUND, colorCallerId, this);
cr->set_source_rgb(ccRed, ccGreen, ccBlue);
cr->rectangle(x_, y_, 1., 1.);
cr->fill();