X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Ftestx11.c;h=cc2162111171ff5bdef371fb0248fc62c15d1bb8;hb=c85f503f5793839a6be4c818332aca4a96927bb2;hp=7932a3736fb483c7b98705c875cf19a761d502bf;hpb=39809ded547bdbb08207d3e514950425215b4410;p=xscreensaver diff --git a/hacks/testx11.c b/hacks/testx11.c index 7932a373..cc216211 100644 --- a/hacks/testx11.c +++ b/hacks/testx11.c @@ -19,6 +19,9 @@ #include "colorbars.h" #include "erase.h" +#include "ximage-loader.h" +#include "images/gen/logo-180_png.h" + #include #include @@ -219,8 +222,15 @@ make_clip_mask (struct testx11 *st) static void colorbars (struct testx11 *st) { + Pixmap logo_mask = 0; + Pixmap logo = image_data_to_pixmap (st->dpy, st->win, + logo_180_png, sizeof(logo_180_png), + 0, 0, &logo_mask); draw_colorbars (st->xgwa.screen, st->xgwa.visual, st->win, - st->xgwa.colormap, 0, 0, st->xgwa.width, st->xgwa.height); + st->xgwa.colormap, 0, 0, st->xgwa.width, st->xgwa.height, + logo, logo_mask); + XFreePixmap (st->dpy, logo); + XFreePixmap (st->dpy, logo_mask); } @@ -341,6 +351,8 @@ testx11_init (Display *dpy, Window win) toggle_antialiasing (st); + st->erase = NULL; + jwxyz_assert_display (dpy); st->rot = make_rotator (2, 2, 2, 2, 0.01, False); @@ -358,7 +370,8 @@ backdrop (struct testx11 *st, Drawable t) const float s0 = 2 * M_PI / tile_count; float y_fac = sin ((y + st->frame / 16.0) * s0); for (x = 0; x != tile_count; ++x) { - unsigned c = ((sin ((x + st->frame / 8.0) * s0) * y_fac) - 1) / 2 * st->backdrop_ncolors / 2; + int c = ((sin ((x + st->frame / 8.0) * s0) * y_fac) - 1) / 2 * + st->backdrop_ncolors / 2; c = (c + st->frame) % st->backdrop_ncolors; XSetBackground (st->dpy, st->backdrop_black_gc, st->backdrop_colors[c].pixel);