swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] Problems generating png from pixmap


From: Paul E Johnson
Subject: Re: [Swarm-Support] Problems generating png from pixmap
Date: Tue, 11 Feb 2003 15:05:47 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020918

Your pixId has no createEnd.

That will crash all the time.

Rex Oleson wrote:
OK I have looked through the example, faq and news group but I still can't seem 
to get it to work.

I am running redhat 8.0
and this is the code that should be doing the job, but it crashes right after 
it tries to save the first png and the image file is created but does not 
contain the image.

- takeSnapshotOfRoot
{
   char filename[40];
   unsigned timeNow;
   id pixId;

   timeNow = getCurrentTime();

   // Create a file name that contains the simulation time:
   sprintf( filename,"zmovie.rootwindow.%04d.png", timeNow );
   printf( "time is %04d", timeNow );

   if( timeNow > 5 )
   {
      // Write the bitmap snapshot to disk:
      pixId = [Pixmap createBegin: self];
      [pixId setWidget: nil];
      [pixId setDecorationsFlag: YES];
      [pixId save: filename];

      // Release the memory used by the Pixmap object:
      [pixId drop];
   }

   return self;
}

any suggestions would be greatly appreciated thank you.


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700



reply via email to

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