From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] rio handlebar streamers From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 13 Nov 2002 18:56:50 +0000 Topicbox-Message-UUID: 1d88ac2a-eacb-11e9-9e20-41e7f4b1d025 > it expects an image the same dimensions as the screen and > (can't|won't) cope with repainting the background when rio is running > in a window smaller than the image, but that's okay. actually, it should be trivial to make it cope with either of the above. a) use readimage(2) to read in the image (this copes with compressed images) b) call replclipr to make the image replicated; that way an image smaller than the screen will tile correctly. something like: (untested) void iconinit(char *bgimage) { int fd; if (bgimage != nil && (fd = open(bgimage, OREAD)) != -1) { background = readimage(display, fd, 1); if (background != nil) replclipr(background, 1, display->image->r); close(fd); } if (background == nil) background = allocimage(display, Rect(0,0,1,1), RGB24, 1, 0x777777FF); red = allocimage(display, Rect(0,0,1,1), RGB24, 1, 0xDD0000FF); }