X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Ffadeplot.c;h=9fa65f8f13f10acb2ff58f6304c194683d7c9d56;hp=babec31c6efb7d72deedde20bd545e387f21cae8;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hpb=c70f94f648d51bb4828193124f325fa52b0e57f3 diff --git a/hacks/fadeplot.c b/hacks/fadeplot.c index babec31c..9fa65f8f 100644 --- a/hacks/fadeplot.c +++ b/hacks/fadeplot.c @@ -38,7 +38,6 @@ static const char sccsid[] = "@(#)fadeplot.c 5.00 2000/11/01 xlockmore"; # 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 +211,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