swarm-support
[Top][All Lists]
Advanced

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

Re: Movies


From: Jan Kreft
Subject: Re: Movies
Date: Tue, 20 Jan 1998 20:34:03 +0000 (GMT)

Hi,

yes, now it works! Thanks very much all of you. The main point was, choose
the right X function! The gist of Marcus' suggestion was to use

On 19 Jan 1998, Marcus G. Daniels wrote:

> XpmWriteFileFromPixmap (display, fileNameBuf, pm, 0, NULL);

instead of my

result = XWriteBitmapFile(display, fileName, pm, width, height, -1, -1);

Only had to change two lines from my previous Raster.m. What I now have
added to the original Raster is the following (In Swarm's Raster.m):

#include <X11/xpm.h>

...

@implementation Raster

...

-writeBitmapToFile:  (char *) f {
  // adapted from Raster-drawSelf and ZoomRaster-writeSelfToFile
  char * fileName = f;

  XpmWriteFileFromPixmap(display, fileName, pm, 0, NULL);

  return self;
}

In Gecko's QuadDisplay.m (This is called every n timesteps, QuadDisplay
is subclassed from Raster):

-writeFrame { // make screenshot of worldDisplay raster = "Gecko" window
  char filename[256];
  sprintf(filename, "%s.%06d.ppm", [geckoControl getFileStem], 
getCurrentTime());
  [self writeBitmapToFile: filename]; // message in Raster
  return self;
}

Thanks again very much for your help,

Jan.


                  ==================================
   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]