Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!hc!siegel From: siegel@hc.DSPO.GOV (josh Siegel) Newsgroups: comp.windows.news Subject: Re: converting SunView icons to NeWS icons Keywords: icon sunview news kludge Message-ID: <14462@hc.DSPO.GOV> Date: 6 Mar 89 17:04:43 GMT Organization: Los Alamos National Laboratory Lines: 56 NeWSer converts suntools icons to a "NeWS" icon. Then, there is "example.cps" which includes a "foobar" icon and displays it. Is this good enough or do you want to convert it to a NeWS font?!? --------- NeWSer #! /bin/sh ed - $1.icon< /g 2,\$s/^\(.*\)$/<\1> append/g w $1.news q EOF ------- example.cps /win framebuffer /new DefaultWindow send def /showicon { dup type /stringtype eq { % use string as an icon image gsave currentpoint translate 64 64 scale 0 setgray 64 64 true [1 0 0 1 0 0] 5 -1 roll imagemask grestore } { % assume literal and use as standard icon lookup % this comes straight out of 'icons.ps' currentfont ( ) dup 0 icondict 5 index get put iconfont setfont show setfont pop } ifelse } def { /IconImage #include "foobar2.news" def % Give it an icon 200 200 700 350 reshape % Give it a size } win send /map win send -- Josh Siegel (siegel@hc.dspo.gov) I like using a C-47A "puff dragon" to go shooting beer cans with.