X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Ffadeplot.c;h=25fe734325770a3d29709aab4e14b48fd35dacb1;hb=3f1091236d800c43a3124c44c7da54e53f205b13;hp=babec31c6efb7d72deedde20bd545e387f21cae8;hpb=50be9bb40dc60130c99ffa568e6677779904ff70;p=xscreensaver diff --git a/hacks/fadeplot.c b/hacks/fadeplot.c index babec31c..25fe7343 100644 --- a/hacks/fadeplot.c +++ b/hacks/fadeplot.c @@ -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