From http://www.jwz.org/xscreensaver/xscreensaver-5.22.tar.gz
[xscreensaver] / hacks / fadeplot.c
index babec31c6efb7d72deedde20bd545e387f21cae8..25fe734325770a3d29709aab4e14b48fd35dacb1 100644 (file)
@@ -35,10 +35,10 @@ static const char sccsid[] = "@(#)fadeplot.c        5.00 2000/11/01 xlockmore";
                                        "*cycles: 1500 \n" \
                                        "*ncolors: 64 \n" \
                                        "*fpsSolid: true \n" \
+                                       "*ignoreRotation: True \n" \
 
 # define BRIGHT_COLORS
 # define UNIFORM_COLORS
-# define reshape_fadeplot 0
 # define fadeplot_handle_event 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
@@ -212,10 +212,20 @@ draw_fadeplot (ModeInfo * mi)
        }
 }
 
+ENTRYPOINT void
+reshape_fadeplot(ModeInfo * mi, int width, int height)
+{
+       fadeplotstruct *fp = &fadeplots[MI_SCREEN(mi)];
+    fp->width  = width;
+    fp->height = height;
+       fp->min = MAX(MIN(fp->width, fp->height) / 2, 1);
+       fp->factor.x = MAX(fp->width / (2 * fp->min), 1);
+       fp->factor.y = MAX(fp->height / (2 * fp->min), 1);
+}
+
 ENTRYPOINT void
 refresh_fadeplot (ModeInfo * mi)
 {
-       MI_CLEARWINDOW(mi);
 }
 
 ENTRYPOINT void