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.