9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] rio handlebar streamers
@ 2002-11-13 23:03 rog
  0 siblings, 0 replies; 4+ messages in thread
From: rog @ 2002-11-13 23:03 UTC (permalink / raw)
  To: 9fans

> Replicating the image is only one alternative. I have quite beautiful
> results with streching an image.

it would be great to have a much faster version of resample(1),
possibly as a library function...

then it would be easy to do what you want in rio.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [9fans] rio handlebar streamers
@ 2002-11-13 22:26 Joel Salomon
  0 siblings, 0 replies; 4+ messages in thread
From: Joel Salomon @ 2002-11-13 22:26 UTC (permalink / raw)
  To: 9fans

> 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.
Replicating the image is only one alternative. I have quite beautiful
results with streching an image. On a 1600x1200 monitor the antialiased
image: (with k=black b=blue g=green r=red p=purple)
kkgk
bkkp
krkk
produces striking results. this works under windoze & several wms under
linux. And with plan9 I get a plain grey background. *sigh*

--Joel
______________________________________________________
FEATUREITIS: 2 more feature requests
this way -->



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] rio handlebar streamers
@ 2002-11-13 18:56 rog
  0 siblings, 0 replies; 4+ messages in thread
From: rog @ 2002-11-13 18:56 UTC (permalink / raw)
  To: 9fans

> 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);
}



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [9fans] rio handlebar streamers
@ 2002-11-13 18:08 markp
  0 siblings, 0 replies; 4+ messages in thread
From: markp @ 2002-11-13 18:08 UTC (permalink / raw)
  To: 9fans

the idea may be heretical, but i've added a '-w' option to rio that
draws an image from an uncompressed image(6) file on the "root
window".  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.

the beauty is that even a halfwit like me could figure it out in less
than an hour.  :)

my background images are various black & white photos from the library
of congress "american memory" collection, mostly of steam trains.

--
m a r k p                    `` simple ain't easy ''   --t.s. monk



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-11-13 23:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-13 23:03 [9fans] rio handlebar streamers rog
  -- strict thread matches above, loose matches on Subject: below --
2002-11-13 22:26 Joel Salomon
2002-11-13 18:56 rog
2002-11-13 18:08 markp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).