1 /* tessellimage, Copyright (c) 2014-2018 Jamie Zawinski <jwz@jwz.org>
3 * Permission to use, copy, modify, distribute, and sell this software and its
4 * documentation for any purpose is hereby granted without fee, provided that
5 * the above copyright notice appear in all copies and that both that
6 * copyright notice and this permission notice appear in supporting
7 * documentation. No representations are made about the suitability of this
8 * software for any purpose. It is provided "as is" without express or
12 #include "screenhack.h"
19 # define XK_MISCELLANY
20 # include <X11/keysymdef.h>
24 #define countof(x) (sizeof((x))/sizeof((*x)))
29 XWindowAttributes xgwa;
32 Bool outline_p, cache_p, fill_p;
33 double duration, duration2;
34 int max_depth, max_resolution;
35 double start_time, start_time2;
38 Pixmap image, output, deltap;
39 int nthreshes, threshes[256], vsizes[256];
43 async_load_state *img_loader;
49 /* Returns the current time in seconds as a double.
55 # ifdef GETTIMEOFDAY_TWO_ARGS
57 gettimeofday(&now, &tzp);
62 return (now.tv_sec + ((double) now.tv_usec * 0.000001));
67 tessellimage_init (Display *dpy, Window window)
69 struct state *st = (struct state *) calloc (1, sizeof(*st));
74 XGetWindowAttributes (st->dpy, st->window, &st->xgwa);
76 st->delay = get_integer_resource (st->dpy, "delay", "Integer");
77 if (st->delay < 1) st->delay = 1;
79 st->outline_p = get_boolean_resource (st->dpy, "outline", "Boolean");
80 st->cache_p = get_boolean_resource (st->dpy, "cache", "Boolean");
81 st->fill_p = get_boolean_resource (st->dpy, "fillScreen", "Boolean");
83 st->max_depth = get_integer_resource (st->dpy, "maxDepth", "MaxDepth");
84 if (st->max_depth < 100) st->max_depth = 100;
86 st->max_resolution = get_integer_resource (st->dpy,
87 "maxResolution", "MaxResolution");
88 if (st->max_resolution < 0) st->max_resolution = 0;
90 st->duration = get_float_resource (st->dpy, "duration", "Seconds");
91 if (st->duration < 1) st->duration = 1;
93 st->duration2 = get_float_resource (st->dpy, "duration2", "Seconds");
94 if (st->duration2 < 0.001) st->duration = 0.001;
96 XClearWindow(st->dpy, st->window);
102 /* Given a bitmask, returns the position and width of the field.
105 decode_mask (unsigned int mask, unsigned int *pos_ret, unsigned int *size_ret)
108 for (i = 0; i < 32; i++)
109 if (mask & (1L << i))
113 for (; i < 32; i++, j++)
114 if (! (mask & (1L << i)))
123 pixel_distance (Screen *s, Visual *v, unsigned long p1, unsigned long p2)
125 static int initted_p = 0;
126 static unsigned long rmsk=0, gmsk=0, bmsk=0;
127 static unsigned int rpos=0, gpos=0, bpos=0;
128 static unsigned int rsiz=0, gsiz=0, bsiz=0;
130 unsigned char r1, g1, b1;
131 unsigned char r2, g2, b2;
134 if (!p1 && !p2) return 0;
137 visual_rgb_masks (s, v, &rmsk, &gmsk, &bmsk);
138 decode_mask (rmsk, &rpos, &rsiz);
139 decode_mask (gmsk, &gpos, &gsiz);
140 decode_mask (bmsk, &bpos, &bsiz);
144 r1 = (p1 & rmsk) >> rpos;
145 g1 = (p1 & gmsk) >> gpos;
146 b1 = (p1 & bmsk) >> bpos;
148 r2 = (p2 & rmsk) >> rpos;
149 g2 = (p2 & gmsk) >> gpos;
150 b2 = (p2 & bmsk) >> bpos;
153 /* Compute the distance in linear RGB space.
155 distance = cbrt (((r2 - r1) * (r2 - r1)) +
156 ((g2 - g1) * (g2 - g1)) +
157 ((b2 - b1) * (b2 - b1)));
160 /* Compute the distance in luminance-weighted RGB space.
163 int rd = (r2 - r1) * 0.2989 * (1 / 0.5870);
164 int gd = (g2 - g1) * 0.5870 * (1 / 0.5870);
165 int bd = (b2 - b1) * 0.1140 * (1 / 0.5870);
166 distance = cbrt ((rd * rd) + (gd * gd) + (bd * bd));
169 /* Compute the distance in brightness-weighted HSV space.
170 (Slower, and doesn't seem to look better than luminance RGB.)
176 double hd, sd, vd, dd;
177 rgb_to_hsv (r1, g1, b1, &h1, &s1, &v1);
178 rgb_to_hsv (r2, g2, b2, &h2, &s2, &v2);
181 if (hd >= 180) hd -= 180;
186 /* [hsv]d are now the distance as 0.0 - 1.0. */
187 /* Compute the overall distance, giving more weight to V. */
188 dd = (hd * 0.25 + sd * 0.25 + vd * 0.5);
190 if (dd < 0 || dd > 1.0) abort();
195 if (distance < 0) distance = -distance;
201 flush_cache (struct state *st)
204 for (i = 0; i < countof(st->cache); i++)
207 XFreePixmap (st->dpy, st->cache[i]);
212 XFreePixmap (st->dpy, st->deltap);
218 /* Scale up the bits in st->img so that it fills the screen, centered.
221 scale_image (struct state *st)
223 double scale, s1, s2;
227 if (st->geom.width <= 0 || st->geom.height <= 0)
230 s1 = st->geom.width / (double) st->img->width;
231 s2 = st->geom.height / (double) st->img->height;
232 scale = (s1 < s2 ? s1 : s2);
234 img2 = XCreateImage (st->dpy, st->xgwa.visual, st->img->depth,
236 st->img->width, st->img->height, 8, 0);
238 img2->data = (char *) calloc (img2->height, img2->bytes_per_line);
239 if (! img2->data) abort();
241 cx = st->img->width / 2;
242 cy = st->img->height / 2;
244 if (st->geom.width < st->geom.height) /* portrait: aim toward the top */
245 cy = st->img->height / (2 / scale);
247 for (y = 0; y < img2->height; y++)
248 for (x = 0; x < img2->width; x++)
250 int x2 = cx + ((x - cx) * scale);
251 int y2 = cy + ((y - cy) * scale);
253 if (x2 >= 0 && y2 >= 0 &&
254 x2 < st->img->width && y2 < st->img->height)
255 p = XGetPixel (st->img, x2, y2);
256 XPutPixel (img2, x, y, p);
258 free (st->img->data);
260 XDestroyImage (st->img);
265 st->geom.width = st->img->width;
266 st->geom.height = st->img->height;
272 analyze (struct state *st)
276 unsigned int w, h, bw, d;
277 unsigned long histo[256];
281 /* Convert the loaded pixmap to an XImage.
283 XGetWindowAttributes (st->dpy, st->window, &st->xgwa);
284 XGetGeometry (st->dpy, st->image, &root, &x, &y, &w, &h, &bw, &d);
288 free (st->img->data);
290 XDestroyImage (st->img);
292 st->img = XGetImage (st->dpy, st->image, 0, 0, w, h, ~0L, ZPixmap);
294 if (st->fill_p) scale_image (st);
296 /* Create the delta map: color space distance between each pixel.
297 Maybe doing running a Sobel Filter matrix on this would be a
298 better idea. That might be a bit faster, but I think it would
299 make no visual difference.
303 free (st->delta->data);
305 XDestroyImage (st->delta);
307 st->delta = XCreateImage (st->dpy, st->xgwa.visual, d, ZPixmap, 0, NULL,
309 st->delta->data = (char *)
310 calloc (st->delta->height, st->delta->bytes_per_line);
312 for (y = 0; y < st->delta->height; y++)
314 for (x = 0; x < st->delta->width; x++)
316 unsigned long pixels[5];
319 pixels[i++] = XGetPixel (st->img, x, y);
320 pixels[i++] = (x > 0 && y > 0 ? XGetPixel (st->img, x-1, y-1) : 0);
321 pixels[i++] = ( y > 0 ? XGetPixel (st->img, x, y-1) : 0);
322 pixels[i++] = (x > 0 ? XGetPixel (st->img, x-1, y) : 0);
323 pixels[i++] = (x > 0 && y < h-1 ? XGetPixel (st->img, x-1, y+1) : 0);
325 for (i = 1; i < countof(pixels); i++)
326 distance += pixel_distance (st->xgwa.screen, st->xgwa.visual,
327 pixels[0], pixels[i]);
328 distance /= countof(pixels)-1;
329 XPutPixel (st->delta, x, y, distance);
333 /* Collect a histogram of every distance value.
335 memset (histo, 0, sizeof(histo));
336 for (y = 0; y < st->delta->height; y++)
337 for (x = 0; x < st->delta->width; x++)
339 unsigned long p = XGetPixel (st->delta, x, y);
340 if (p > sizeof(histo)) abort();
344 /* Convert that from "occurrences of N" to ">= N".
346 for (i = countof(histo) - 1; i > 0; i--)
347 histo[i-1] += histo[i];
350 fprintf (stderr, "%s: histo: ", progname);
351 for (i = 0; i < countof(histo); i++)
352 fprintf(stderr, "%d:%lu ", i, histo[i]);
353 fprintf(stderr, "\n");
356 /* Collect a useful set of threshold values, ignoring thresholds that
357 result in a very similar number of control points (since those images
358 probably won't look very different).
362 int max_vsize = st->max_depth;
366 if (min_vsize > max_vsize/100)
367 min_vsize = max_vsize/100;
369 if (min_delta > max_vsize/1000)
370 min_delta = max_vsize/1000;
373 for (i = countof(histo)-1; i >= 0; i--)
375 unsigned long vsize = histo[i];
377 /* If this is a different vsize, push it. */
378 if (vsize >= min_vsize &&
379 vsize <= max_vsize &&
380 (st->nthreshes == 0 ||
381 vsize >= st->vsizes[st->nthreshes-1] + min_delta))
383 st->threshes[st->nthreshes] = i;
384 st->vsizes[st->nthreshes] = vsize;
390 st->thresh = 0; /* startup */
391 st->dthresh = 1; /* forward */
395 XFreePixmap (st->dpy, st->output);
401 fprintf (stderr, "%s: threshes:", progname);
402 for (i = 0; i < st->nthreshes; i++)
403 fprintf (stderr, " %d=%d", st->threshes[i], st->vsizes[i]);
404 fprintf (stderr, "\n");
410 /* True if the distance between any two corners is too small for it to
411 make sense to draw an outline around this triangle.
414 small_triangle_p (const XPoint *p)
417 if (abs (p[0].x - p[1].x) < min) return True;
418 if (abs (p[0].y - p[1].y) < min) return True;
419 if (abs (p[1].x - p[2].x) < min) return True;
420 if (abs (p[1].y - p[2].y) < min) return True;
421 if (abs (p[2].x - p[0].x) < min) return True;
422 if (abs (p[2].y - p[0].y) < min) return True;
425 #endif /* DO_VORONOI */
434 static voronoi_polygon *
435 delaunay_to_voronoi (int np, XYZ *p, int nv, ITRIANGLE *v)
443 struct tri_list *vert_to_tri = (struct tri_list *)
444 calloc (np + 1, sizeof(*vert_to_tri));
445 voronoi_polygon *out = (voronoi_polygon *) calloc (np + 1, sizeof(*out));
448 for (i = 0; i < np; i++)
449 printf("# p %d = %d %d\n", i, (int)p[i].x, (int)p[i].y);
451 for (i = 0; i < nv; i++)
452 printf("@ t %d = %d %d %d\n", i, (int)v[i].p1, (int)v[i].p2, (int)v[i].p3);
456 /* Iterate the triangles to construct a map of vertices to the
457 triangles that contain them.
459 for (i = 0; i < nv; i++)
461 for (j = 0; j < 3; j++) /* iterate points in each triangle */
463 int p = *((&v[i].p1) + j);
464 struct tri_list *t = &vert_to_tri[p];
465 if (p < 0 || p >= np) abort();
466 if (t->size <= t->count + 1)
470 t->tri = realloc (t->tri, t->size * sizeof(*t->tri));
471 if (! t->tri) abort();
473 t->tri[t->count++] = i;
478 for (i = 0; i < nv; i++)
480 struct tri_list *t = &vert_to_tri[i];
481 printf("p %d [%d %d]:", i, (int)p[i].x, (int)p[i].y);
482 for (j = 0; j < t->count; j++) {
484 printf(" t %d [%d(%d %d) %d(%d %d) %d(%d %d)]",
487 (int)p[v[tt].p1].x, (int)p[v[tt].p1].y,
489 (int)p[v[tt].p2].x, (int)p[v[tt].p2].y,
491 (int)p[v[tt].p3].x, (int)p[v[tt].p3].y
493 if (tt < 0 || tt >= nv) abort();
499 /* For every vertex, compose a polygon whose corners are the centers
500 of each triangle using that vertex. Skip any with less than 3 points.
502 for (i = 0; i < np; i++)
504 struct tri_list *t = &vert_to_tri[i];
509 ? (XPoint *) calloc (out[i].npoints + 1, sizeof (*out[i].p))
512 for (j = 0; j < out[i].npoints; j++)
514 ITRIANGLE *tt = &v[t->tri[j]];
515 out[i].p[j].x = (p[tt->p1].x + p[tt->p2].x + p[tt->p3].x) / 3;
516 out[i].p[j].y = (p[tt->p1].y + p[tt->p2].y + p[tt->p3].y) / 3;
517 //printf(" [%d: %d %d]", j, out[i].p[j].x, out[i].p[j].y);
526 #endif /* DO_VORONOI */
532 tessellate (struct state *st)
534 Bool ticked_p = False;
536 if (! st->image) return;
541 gcv.function = GXcopy;
542 gcv.subwindow_mode = IncludeInferiors;
543 st->wgc = XCreateGC(st->dpy, st->window, GCFunction, &gcv);
544 st->pgc = XCreateGC(st->dpy, st->image, GCFunction, &gcv);
547 if (! st->nthreshes) return;
550 /* If duration2 has expired, switch to the next threshold. */
552 if (! st->button_down_p)
554 double t2 = double_time();
555 if (st->start_time2 + st->duration2 < t2)
557 st->start_time2 = t2;
558 st->thresh += st->dthresh;
560 if (st->thresh >= st->nthreshes)
562 st->thresh = st->nthreshes - 1;
565 else if (st->thresh < 0)
576 /* If we've picked a new threshold, regenerate the output image. */
578 if (ticked_p && st->cache[st->thresh])
582 st->cache[st->thresh],
584 0, 0, st->xgwa.width, st->xgwa.height,
589 int threshold = st->threshes[st->thresh];
590 int vsize = st->vsizes[st->thresh];
596 double wscale = st->xgwa.width / (double) st->delta->width;
599 fprintf(stderr, "%s: thresh %d/%d = %d=%d\n",
600 progname, st->thresh, st->nthreshes, threshold, vsize);
603 /* Create a control point at every pixel where the delta is above
604 the current threshold. Triangulate from those. */
606 vsize += 8; /* corners of screen + corners of image */
608 p = (XYZ *) calloc (vsize+4, sizeof(*p));
609 v = (ITRIANGLE *) calloc (3*(vsize+4), sizeof(*v));
612 fprintf (stderr, "%s: out of memory (%d)\n", progname, vsize);
616 /* Add control points for the corners of the screen, and for the
617 corners of the image.
619 if (st->geom.width <= 0) st->geom.width = st->delta->width;
620 if (st->geom.height <= 0) st->geom.height = st->delta->height;
622 for (y = 0; y <= 1; y++)
623 for (x = 0; x <= 1; x++)
625 p[nv].x = x ? st->delta->width-1 : 0;
626 p[nv].y = y ? st->delta->height-1 : 0;
627 p[nv].z = XGetPixel (st->delta, (int) p[nv].x, (int) p[nv].y);
629 p[nv].x = st->geom.x + (x ? st->geom.width-1 : 0);
630 p[nv].y = st->geom.y + (y ? st->geom.height-1 : 0);
631 p[nv].z = XGetPixel (st->delta, (int) p[nv].x, (int) p[nv].y);
635 /* Add control points for every pixel that exceeds the threshold.
637 for (y = 0; y < st->delta->height; y++)
638 for (x = 0; x < st->delta->width; x++)
640 unsigned long px = XGetPixel (st->delta, x, y);
643 if (nv >= vsize) abort();
651 if (nv != vsize) abort();
653 qsort (p, nv, sizeof(*p), delaunay_xyzcompare);
654 if (delaunay (nv, p, v, &ntri))
656 fprintf (stderr, "%s: out of memory\n", progname);
660 /* Create the output pixmap based on that triangulation. */
663 XFreePixmap (st->dpy, st->output);
664 st->output = XCreatePixmap (st->dpy, st->window,
665 st->xgwa.width, st->xgwa.height,
667 XFillRectangle (st->dpy, st->output, st->pgc,
668 0, 0, st->xgwa.width, st->xgwa.height);
672 voronoi_polygon *polys = delaunay_to_voronoi (nv, p, ntri, v);
673 for (i = 0; i < nv; i++)
675 if (polys[i].npoints >= 3)
677 unsigned long color = XGetPixel (st->img, p[i].x, p[i].y);
678 XSetForeground (st->dpy, st->pgc, color);
679 XFillPolygon (st->dpy, st->output, st->pgc,
680 polys[i].p, polys[i].npoints,
681 Convex, CoordModeOrigin);
688 XQueryColor (st->dpy, st->xgwa.colormap, &bd);
693 /* bd.red = 0xFFFF; bd.green = 0; bd.blue = 0; */
695 XAllocColor (st->dpy, st->xgwa.colormap, &bd);
696 XSetForeground (st->dpy, st->pgc, bd.pixel);
697 XDrawLines (st->dpy, st->output, st->pgc,
698 polys[i].p, polys[i].npoints,
700 XFreeColors (st->dpy, st->xgwa.colormap, &bd.pixel, 1, 0);
703 if (polys[i].p) free (polys[i].p);
708 #else /* !DO_VORONOI */
710 for (i = 0; i < ntri; i++)
714 xp[0].x = p[v[i].p1].x * wscale; xp[0].y = p[v[i].p1].y * wscale;
715 xp[1].x = p[v[i].p2].x * wscale; xp[1].y = p[v[i].p2].y * wscale;
716 xp[2].x = p[v[i].p3].x * wscale; xp[2].y = p[v[i].p3].y * wscale;
718 /* Set the color of this triangle to the pixel at its midpoint. */
719 color = XGetPixel (st->img,
720 (xp[0].x + xp[1].x + xp[2].x) / (3 * wscale),
721 (xp[0].y + xp[1].y + xp[2].y) / (3 * wscale));
723 XSetForeground (st->dpy, st->pgc, color);
724 XFillPolygon (st->dpy, st->output, st->pgc, xp, countof(xp),
725 Convex, CoordModeOrigin);
727 if (st->outline_p && !small_triangle_p(xp))
728 { /* Border the triangle with a color that is darker */
732 XQueryColor (st->dpy, st->xgwa.colormap, &bd);
737 /* bd.red = 0xFFFF; bd.green = 0; bd.blue = 0; */
739 XAllocColor (st->dpy, st->xgwa.colormap, &bd);
740 XSetForeground (st->dpy, st->pgc, bd.pixel);
741 XDrawLines (st->dpy, st->output, st->pgc,
742 xp, countof(xp), CoordModeOrigin);
743 XFreeColors (st->dpy, st->xgwa.colormap, &bd.pixel, 1, 0);
746 #endif /* !DO_VORONOI */
751 if (st->cache_p && !st->cache[st->thresh])
753 st->cache[st->thresh] =
754 XCreatePixmap (st->dpy, st->window,
755 st->xgwa.width, st->xgwa.height,
757 if (! st->cache[st->thresh])
759 fprintf (stderr, "%s: out of memory\n", progname);
765 st->cache[st->thresh],
767 0, 0, st->xgwa.width, st->xgwa.height,
772 if (! st->output) abort();
776 /* Convert the delta map into a displayable pixmap.
779 get_deltap (struct state *st)
782 int w = st->xgwa.width;
783 int h = st->xgwa.height;
784 double wscale = st->xgwa.width / (double) st->delta->width;
787 Visual *v = st->xgwa.visual;
788 unsigned long rmsk=0, gmsk=0, bmsk=0;
789 unsigned int rpos=0, gpos=0, bpos=0;
790 unsigned int rsiz=0, gsiz=0, bsiz=0;
792 if (st->deltap) return st->deltap;
794 visual_rgb_masks (st->xgwa.screen, v, &rmsk, &gmsk, &bmsk);
795 decode_mask (rmsk, &rpos, &rsiz);
796 decode_mask (gmsk, &gpos, &gsiz);
797 decode_mask (bmsk, &bpos, &bsiz);
799 dimg = XCreateImage (st->dpy, st->xgwa.visual, st->xgwa.depth,
800 ZPixmap, 0, NULL, w, h, 8, 0);
802 dimg->data = (char *) calloc (dimg->height, dimg->bytes_per_line);
803 if (! dimg->data) abort();
805 for (y = 0; y < h; y++)
806 for (x = 0; x < w; x++)
808 unsigned long v = XGetPixel (st->delta, x / wscale, y / wscale) << 5;
809 unsigned long p = (((v << rpos) & rmsk) |
810 ((v << gpos) & gmsk) |
811 ((v << bpos) & bmsk));
812 XPutPixel (dimg, x, y, p);
815 st->deltap = XCreatePixmap (st->dpy, st->window, w, h, st->xgwa.depth);
816 XPutImage (st->dpy, st->deltap, st->pgc, dimg, 0, 0, 0, 0, w, h);
817 XDestroyImage (dimg);
823 tessellimage_draw (Display *dpy, Window window, void *closure)
825 struct state *st = (struct state *) closure;
827 if (st->img_loader) /* still loading */
829 st->img_loader = load_image_async_simple (st->img_loader, 0, 0, 0, 0,
831 if (! st->img_loader) { /* just finished */
833 st->start_time = double_time();
834 st->start_time2 = st->start_time;
839 if (!st->img_loader &&
840 st->start_time + st->duration < double_time()) {
841 int w = st->xgwa.width;
842 int h = st->xgwa.height;
844 /* Analysing a full-resolution image on a Retina display is too slow,
845 so scale down the source at image-load time. */
846 if (st->max_resolution > 10)
848 if (w > h && w > st->max_resolution)
849 h = st->max_resolution * h / w, w = st->max_resolution;
850 else if (h > st->max_resolution)
851 w = st->max_resolution * w / h, h = st->max_resolution;
853 /* fprintf(stderr,"%s: loading %d x %d\n", progname, w, h); */
855 XClearWindow (st->dpy, st->window);
856 if (st->image) XFreePixmap (dpy, st->image);
857 st->image = XCreatePixmap (st->dpy, st->window, w, h, st->xgwa.depth);
858 st->img_loader = load_image_async_simple (0, st->xgwa.screen, st->window,
859 st->image, 0, &st->geom);
865 XGetWindowAttributes (st->dpy, st->window, &st->xgwa);
866 XClearWindow (st->dpy, st->window);
870 (st->button_down_p ? get_deltap (st) : st->output),
872 0, 0, st->xgwa.width, st->xgwa.height, 0, 0);
873 else if (!st->nthreshes)
877 0, 0, st->xgwa.width, st->xgwa.height, 0, 0);
885 tessellimage_reshape (Display *dpy, Window window, void *closure,
886 unsigned int w, unsigned int h)
888 struct state *st = (struct state *) closure;
889 XGetWindowAttributes (st->dpy, st->window, &st->xgwa);
893 tessellimage_event (Display *dpy, Window window, void *closure, XEvent *event)
895 struct state *st = (struct state *) closure;
896 if (event->xany.type == ButtonPress)
898 st->button_down_p = True;
901 else if (event->xany.type == ButtonRelease)
903 st->button_down_p = False;
906 else if (screenhack_event_helper (dpy, window, event))
908 st->start_time = 0; /* load next image */
917 tessellimage_free (Display *dpy, Window window, void *closure)
919 struct state *st = (struct state *) closure;
921 if (st->wgc) XFreeGC (dpy, st->wgc);
922 if (st->pgc) XFreeGC (dpy, st->pgc);
923 if (st->image) XFreePixmap (dpy, st->image);
924 if (st->output) XFreePixmap (dpy, st->output);
925 if (st->delta) XDestroyImage (st->delta);
932 static const char *tessellimage_defaults [] = {
933 ".background: black",
934 ".foreground: white",
936 "*dontClearRoot: True",
942 "*maxResolution: 1024",
947 "*ignoreRotation: True",
948 "*rotateImages: True",
953 static XrmOptionDescRec tessellimage_options [] = {
954 { "-delay", ".delay", XrmoptionSepArg, 0 },
955 { "-duration", ".duration", XrmoptionSepArg, 0 },
956 { "-duration2", ".duration2", XrmoptionSepArg, 0 },
957 { "-max-depth", ".maxDepth", XrmoptionSepArg, 0 },
958 { "-max-resolution", ".maxResolution", XrmoptionSepArg, 0 },
959 { "-outline", ".outline", XrmoptionNoArg, "True" },
960 { "-no-outline", ".outline", XrmoptionNoArg, "False" },
961 { "-fill-screen", ".fillScreen", XrmoptionNoArg, "True" },
962 { "-no-fill-screen", ".fillScreen", XrmoptionNoArg, "False" },
963 { "-cache", ".cache", XrmoptionNoArg, "True" },
964 { "-no-cache", ".cache", XrmoptionNoArg, "False" },
968 XSCREENSAVER_MODULE ("Tessellimage", tessellimage)