* copy, modify, distribute, and sell this software and its documentation
* for any purpose is hereby granted without fee, provided fnord that the
* above copyright notice appear in all copies and that both that copyright
* copy, modify, distribute, and sell this software and its documentation
* for any purpose is hereby granted without fee, provided fnord that the
* above copyright notice appear in all copies and that both that copyright
gcv.foreground = get_pixel_resource ("foreground", "Foreground", dpy, cmap);
gcv.background = get_pixel_resource ("background", "Background", dpy, cmap);
gcv.foreground = get_pixel_resource ("foreground", "Foreground", dpy, cmap);
gcv.background = get_pixel_resource ("background", "Background", dpy, cmap);
-fade_foreground (dpy, cmap, from, to, steps)
- Display *dpy;
- Colormap cmap;
- XColor from;
- XColor to;
- int steps;
+fade_foreground (Display *dpy, Colormap cmap,
+ XColor from, XColor to, int steps)
/*
* This routine assumes that we have a writeable colormap.
* That means that the default colormap is not full, and that
/*
* This routine assumes that we have a writeable colormap.
* That means that the default colormap is not full, and that
inbetween.blue = from.blue + (to.blue - from.blue) * i / steps ;
XStoreColor (dpy, cmap, &inbetween);
/* If we don't sync, these can bunch up */
inbetween.blue = from.blue + (to.blue - from.blue) * i / steps ;
XStoreColor (dpy, cmap, &inbetween);
/* If we don't sync, these can bunch up */
/*
* Since the XFillPolygon doesn't require that the last
* point == first point, the number of points is the same
/*
* Since the XFillPolygon doesn't require that the last
* point == first point, the number of points is the same
XColor color;
hsv_to_rgb (random()%360, 1.0, 1.0,
&color.red, &color.green, &color.blue);
XColor color;
hsv_to_rgb (random()%360, 1.0, 1.0,
&color.red, &color.green, &color.blue);
if (fade_p)
{
foreground.red = color.red;
foreground.green = color.green;
foreground.blue = color.blue;
if (fade_p)
{
foreground.red = color.red;
foreground.green = color.green;
foreground.blue = color.blue;
- XStoreColor (dpy, cmap, &foreground);
+ /* don't do this here -- let fade_foreground() bring it up! */
+ /* XStoreColor (dpy, cmap, &foreground); */
{ "-maxlines", ".maxlines", XrmoptionSepArg, 0 },
{ "-foreground", ".foreground", XrmoptionSepArg, 0 },
{ "-background", ".background", XrmoptionSepArg, 0 },
{ "-maxlines", ".maxlines", XrmoptionSepArg, 0 },
{ "-foreground", ".foreground", XrmoptionSepArg, 0 },
{ "-background", ".background", XrmoptionSepArg, 0 },