X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Flmorph.c;h=70c91eee893e5c730166100eaeb45be3c0f4fc6b;hb=5b7bc6e70fb439cf4c4bf771ae9f94077fe4fe08;hp=0c7571acaab9af71603ef89c6911a2db0760ed9d;hpb=186b0b9f1638444c650c9273df38085e0db71e4a;p=xscreensaver diff --git a/hacks/lmorph.c b/hacks/lmorph.c index 0c7571ac..70c91eee 100644 --- a/hacks/lmorph.c +++ b/hacks/lmorph.c @@ -423,12 +423,22 @@ static void initLMorph (void) gcClear = XCreateGC(dpy, window, GCForeground, &gcv); XClearWindow(dpy, window); - srandom(time(NULL)); initPointArrays(); aCurr = aWork[nWork = 0]; aPrev = NULL; gam = 2.0; nTo = RND(cFig); + + { + int width = random() % 10; + int style = LineSolid; + int cap = (width > 1 ? CapRound : CapButt); + int join = (width > 1 ? JoinRound : JoinBevel); + if (width == 1) width = 0; + XSetLineAttributes(dpy, gcDraw, width, style, cap, join); + XSetLineAttributes(dpy, gcClear, width, style, cap, join); + } + } static void animateLMorph (void)