Smooth curve (don't round double to int)
This commit is contained in:
committed by
Stéphane Lesimple
parent
aa00ac9e3e
commit
235a6243d2
@@ -110,7 +110,7 @@ int GuiCurveLX(Curve *curve, gdouble x)
|
||||
return 1 + curve->leftX + (x * width) / (gdouble)curve->maxX;
|
||||
}
|
||||
|
||||
int GuiCurveY(Curve *curve, gdouble y)
|
||||
gdouble GuiCurveY(Curve *curve, gdouble y)
|
||||
{ gdouble hfact;
|
||||
|
||||
hfact = (gdouble)(curve->bottomY - curve->topY)
|
||||
@@ -380,7 +380,8 @@ void GuiRedrawAxes(cairo_t *cr, Curve *curve)
|
||||
*/
|
||||
|
||||
void GuiRedrawCurve(cairo_t *cr, Curve *curve, int last)
|
||||
{ int i,x0,x1,fy0;
|
||||
{ int i,x0,x1;
|
||||
gdouble fy0;
|
||||
|
||||
gdk_cairo_set_source_rgba(cr, Closure->curveColor);
|
||||
cairo_set_line_width(cr, 1.0);
|
||||
|
||||
@@ -690,7 +690,7 @@ void GuiFreeCurve(Curve*);
|
||||
void GuiUpdateCurveGeometry(Curve*, char*, int);
|
||||
|
||||
int GuiCurveX(Curve*, gdouble);
|
||||
int GuiCurveY(Curve*, gdouble);
|
||||
gdouble GuiCurveY(Curve*, gdouble);
|
||||
int GuiCurveLogY(Curve*, gdouble);
|
||||
|
||||
void GuiRedrawAxes(cairo_t *cr, Curve*);
|
||||
|
||||
Reference in New Issue
Block a user