*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
- int s = t->size / 0.383; /* trial and error, I forget how to derive this */
+
+ /*
+ The following constant is really:
+ sqrt(5 - sqrt(5)) / sqrt(25 - 11 * sqrt(5))
+
+ Reference: http://mathworld.wolfram.com/Pentagram.html
+ */
+ int s = t->size * 2.6180339887498985;
flags |= (GCLineWidth | GCCapStyle | GCJoinStyle);
t->gc = XCreateGC (st->dpy, d, flags, &gcv);
flags |= (GCLineWidth | GCCapStyle | GCJoinStyle);
t->gc = XCreateGC (st->dpy, d, flags, &gcv);
jwxyz_XSetAlphaAllowed (st->dpy, t->gc, True);
XSetForeground (st->dpy, t->gc, pixel);
}
jwxyz_XSetAlphaAllowed (st->dpy, t->gc, True);
XSetForeground (st->dpy, t->gc, pixel);
}
st->colors[0].pixel = get_pixel_resource(st->dpy, st->xgwa.colormap,
"foreground", "Foreground");
}
st->colors[0].pixel = get_pixel_resource(st->dpy, st->xgwa.colormap,
"foreground", "Foreground");
}
else if (st->transparent_p)
{
st->nplanes = get_integer_resource (st->dpy, "planes", "Planes");
else if (st->transparent_p)
{
st->nplanes = get_integer_resource (st->dpy, "planes", "Planes");
- make_random_colormap (st->dpy, st->xgwa.visual, st->xgwa.colormap,
+ make_random_colormap (st->xgwa.screen, st->xgwa.visual, st->xgwa.colormap,
st->colors, &st->ncolors, True, True, 0, True);
if (st->ncolors < 2)
goto MONO;
st->colors, &st->ncolors, True, True, 0, True);
if (st->ncolors < 2)
goto MONO;