From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Fri, 11 Dec 2009 20:51:21 -0500 To: 9fans@9fans.net Message-ID: <83dc09c5d930f4fa767615c7eb39f2bc@ladd.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] radar for plan 9, and two draw funnies. Topicbox-Message-UUID: ae81de7c-ead5-11e9-9d60-3106f5b1d025 once upon a time, it was pretty easy to get a radar image on the web. these days, they're fancy. the one i use is http://radar.weather.gov/ridge which consists of a number of transparent images that need to be overlaid. this can be done with page, but it's pretty painful without double-buffering, it's tied too tightly to the screen, and panning a composed image doesn't work. so i wrote a program imgtype that works like doctype(1) for images. it's essentially stolen from page(1). page could use the same code. then i wrote a program compose that takes a series of images of arbitrary type and composes them with SoverD. l = (topo.jpg county.gif cities.gif warn.gif hw.gif radar.gif) f=/lib/radar compose $f/$l|page this works, and is all available in contrib quanstro/radar. it assumes you live in georgia. so you may want to edit the script to put the right radar source in. bonus points for ta script converting from /lib/sky/here to radar. :-) but there are two problems. 1. for some reason the hw.gif (interstates) are in cyan not red. drawing the radar first and the hw second yields inverse radar colors. 2. the county boundaries get red and speckly if any images are drawn on top of them, but only if the target channel format is m8. r8g8b8a8 works fine. why would m8 != r8g8b8? there's an image here /n/sources/contrib/quanstro/drawfunny/bad.png http://www.quanstro.net/plan9/bad.png i belive this http://radar.weather.gov/ridge/radar.php?rid=ffc is what it is supposed to look like. you can also run an experiment on this directly from sources ; cd /n/sources/contrib/quanstro/drawfunny ; ./testinplace i've left p9p and plan 9 source there. the source in drawfunny lags behind the contrib package. - erik