Example #1
0
 protected override void OnSave(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback)
 {
     if (callback == null)
     {
         input.SaveToStream(output);
     }
     else
     {
         UpdateProgressTranslator upt = new UpdateProgressTranslator(ApproximateMaxOutputOffset(input), callback);
         input.SaveToStream(output, new IOEventHandler(upt.IOEventHandler));
     }
 }
Example #2
0
 protected override void OnSave(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback)
 {
     if (callback == null)
     {
         input.SaveToStream(output);
     }
     else
     {
         UpdateProgressTranslator upt = new UpdateProgressTranslator(ApproximateMaxOutputOffset(input), callback);
         input.SaveToStream(output, new IOEventHandler(upt.IOEventHandler));
     }
 }