- int numpoints;
-
- numpoints = compute_pedal(points, maxlines);
-
- /* Fade out, make foreground the same as background */
- if (fade_p)
- fade_foreground (dpy, cmap, foreground, background, 32);
-
- /* Clear the window of previous garbage */
- XClearWindow (dpy, window);
-
- XFillPolygon (
- dpy,
- window,
- gc,
- points,
- numpoints,
- Complex,
- CoordModeOrigin);
-
- /* Pick a new foreground color (added by jwz) */
- if (! mono_p)
- {
- XColor color;
- hsv_to_rgb (random()%360, 1.0, 1.0,
- &color.red, &color.green, &color.blue);
- XSync(dpy, 0);
- if (fade_p)
- {
- foreground.red = color.red;
- foreground.green = color.green;
- foreground.blue = color.blue;
- XStoreColor (dpy, cmap, &foreground);
- }
- else if (XAllocColor (dpy, cmap, &color))
- {
- XSetForeground (dpy, gc, color.pixel);
- XFreeColors (dpy, cmap, &foreground.pixel, 1, 0);
- foreground.red = color.red;
- foreground.green = color.green;
- foreground.blue = color.blue;
- foreground.pixel = color.pixel;
- }
- XSync(dpy, 0);
- }
-
- /* Fade in by bringing the foreground back from background */
- if (fade_p)
- fade_foreground (dpy, cmap, background, foreground, 32);