Cosmetic of the parametric curve editor + reset button added for the curves

This commit is contained in:
Hombre
2010-07-07 10:51:30 +02:00
parent 757fa3b54e
commit d95cf20c98
6 changed files with 78 additions and 10 deletions

View File

@@ -603,3 +603,26 @@ void MyCurve::updateBackgroundHistogram (unsigned int* hist) {
}
void MyCurve::reset() {
int width = get_allocation().get_width() - RADIUS * 2;
int height = get_allocation().get_height() - RADIUS * 2;
switch (curve.type) {
case Spline :
curve.x.clear();
curve.y.clear();
curve.x.push_back(0.);
curve.y.push_back(0.);
curve.x.push_back(1.);
curve.y.push_back(1.);
grab_point = -1;
lit_point = -1;
interpolate (width, height);
break;
case Parametric :
// Nothing to do (?)
default:
break;
}
//draw(width, height, -1);
}