swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'making movies': a sitrep


From: Sven Thommesen
Subject: 'making movies': a sitrep
Date: Thu, 10 Apr 1997 23:48:51 -0500

After Glen graciously distributed the source to xwd, which should allow us
to save bitmaps of rasters to disk on programmatic command, I thought I'd
provide an overview of where the issue stands:

a) your typical heatbugs app has these types of graphical objects:

  i) probe displays (either SimpleProbeDisplay or CompleteProbeDisplay);
        [ SwarmObjects, with a Tk 'frame' as top widget]
 ii) bug and heat rasters: ZoomRaster;
        [ Widgets, with a Tk 'frame' as top widget]
iii) unhappiness graphs: BLTGraph (and EZGraph incorporates a BLTGraph);
        [ Widgets, with a Tk 'graph' as top widget]
 iv) the control Panel.
        [ the ButtonPanel is a Widget, with a Tk 'frame' as top widget]

/* A 'Widget' is an objc object; a 'widget' is a Tk thingie. Clear? */

b) Glen's xwd code DOES allow us to save bug&heat rasters to disk! However:
        * I was not able to get the window borders included,
          only the raster itself showed;
        * The .xwd files are huge -- typically, 600k for one raster;
        * Since the identification depends on the window name, I haven't 
          been able to save probe displays, bltgraps or the control panel.

On the other hand,
        * it IS possible to specify the 'root' window so you can capture the
          whole screen (7Mb or so for 24bpp!);
        * it is possible to specify the desired window by Xwindows ID -- so
          perhaps if we could get ahold of that id with some function call ...
        * if you do not specify what window to capture, you get to click on
          the window of choice. Nice, but then it's difficult to have the
          file name reflect the window chosen ... (On the other hand, now you
          DO get window borders! Go figure.)

c) As Benedikt's ProductSwarm code showed, it is possible to tell BLTGraphs
to save themselves to disk in .eps format. The resulting files are small
(15k). However:
        * only BLTGraphs, unfortunately. I could not get similar code to work
          for any of the other object types.
        * again, no borders are saved.

I had earlier ascertained that in Tk, only 'canvas' widgets have the ability
to write themselves to disk as .eps files. The BLTGraph objects have a
'graph' as the top widget -- must have a canvas in there somewhere. I had
modified probe displays to access a canvas widget they carry, and I got them
to write .eps files -- but got only the outline, not any content. :-(

d) You can use xv or (xwd -> xwdtoppm -> ppmtogif) to save individual,
specified windows to disk with a name you specify. You get borders if you so
desire. Downside: it is manual, it is slow. There is likely a ppmtojpg
utility somewhere, too.


Where to go from here: I see two avenues. Either we figure out how to get
the xwd code to give us window borders and make it work for other objects
than BLTGraphs. Or we figure out how to insert Canvas widgets into the way
the graphical objects are created, so that we can save them to .eps files.
(And then we'd also like to be able to save window borders.)

If anyone has gotten further on these problems than described here, please
share it with the list!

Cheers,
Sven.


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]