- spline_value_at(s, &x, &y, fmod(t,1.0),&segment);
- spline_value_at(s, &x2, &y2, fmod(t+step,1.0),&unused);
-
- /* look ahead for the shadow segment */
- t2=t+step;
- if (t2<=1.0) {
- spline_value_at(s, &x3, &y3, fmod(t2,1.0),&unused);
- while (t2+step<1.0 && (x3-x2)*(x3-x2)+(y3-y2)*(y3-y2) < params.shadow_width*params.shadow_width) {
- t2+=step;
- spline_value_at(s, &x3, &y3, fmod(t2,1.0),&unused);
- }
-
- spline_value_at(s, &x4, &y4, fmod(t2+step,1.0),&unused);
-
- /* draw shadow line */
- XDrawLine(dpy,window,shadow_gc,
- (int)rint(x3),(int)rint(y3),
- (int)rint(x4),(int)rint(y4));
- }
- /* draw line segment */
- if (p->splines->nb_elements==1)
- XSetForeground(dpy, gc, colors[segment%(ncolors-3)+2].pixel);
- else
- XSetForeground(dpy, gc, colors[s->color].pixel);
- XDrawLine(dpy,window,gc,
- (int)rint(x),(int)rint(y),
- (int)rint(x2),(int)rint(y2));
+ spline_value_at(s, &x, &y, fmod(t,1.0),&segment);
+ spline_value_at(s, &x2, &y2, fmod(t+step,1.0),&unused);
+
+ /* look ahead for the shadow segment */
+ t2=t+step;
+ if (t2<=1.0) {
+ spline_value_at(s, &x3, &y3, fmod(t2,1.0),&unused);
+ while (t2+step<1.0 && (x3-x2)*(x3-x2)+(y3-y2)*(y3-y2) < st->params.shadow_width*st->params.shadow_width) {
+ t2+=step;
+ spline_value_at(s, &x3, &y3, fmod(t2,1.0),&unused);
+ }
+
+ spline_value_at(s, &x4, &y4, fmod(t2+step,1.0),&unused);
+
+ /* draw shadow line */
+ XDrawLine(st->dpy,st->window,st->shadow_gc,
+ (int)rint(x3),(int)rint(y3),
+ (int)rint(x4),(int)rint(y4));
+ }
+ /* draw line segment */
+ if (p->splines->nb_elements==1)
+ XSetForeground(st->dpy, st->gc, st->colors[segment%(p->ncolors-3)+2].pixel);
+ else
+ XSetForeground(st->dpy, st->gc, st->colors[s->color].pixel);
+ XDrawLine(st->dpy,st->window,st->gc,
+ (int)rint(x),(int)rint(y),
+ (int)rint(x2),(int)rint(y2));