BOOL ThumbnailFilterPNG::DoExport(Operation* pOp, CCLexFile* pFile, PathName* pPath, Document* TheDocument, BOOL ShowOptions) { // set ourselves up - this flags the BaseBitmapFilter to do resizing, which needs to be // done there because of Accusoft. SetPreviewBitmap(TRUE); // create a new view for the document DocView *pView = new DocView(TheDocument); if (pView && pView->Init()) { // set the view as current, but remember the last current one View *pOldView = View::GetCurrent(); pView->SetCurrent(); // Export the thumbnail to the file by doing what our base class does BOOL ok = PNGFilter::DoExport(pOp, pFile, pPath, TheDocument, TRUE); // restore the last view if (pOldView != NULL) pOldView->SetCurrent(); else View::SetNoCurrent(); // delete our view delete pView; return ok; } else return FALSE; // view creation failed }
ThresholdManipulator::ThresholdManipulator(BBitmap *bm) : WindowGUIManipulator() { preview_bitmap = NULL; config_view = NULL; copy_of_the_preview_bitmap = NULL; previous_settings.threshold = settings.threshold + 1; SetPreviewBitmap(bm); }
ColorBalanceManipulator::ColorBalanceManipulator(BBitmap *bm) : WindowGUIManipulator() { preview_bitmap = NULL; copy_of_the_preview_bitmap = NULL; config_view = NULL; SetPreviewBitmap(bm); lowest_allowed_quality = 2; last_used_quality = 2; }
SaturationManipulator::SaturationManipulator(BBitmap *bm) : WindowGUIManipulator() { preview_bitmap = NULL; config_view = NULL; copy_of_the_preview_bitmap = NULL; luminance_image = NULL; previous_settings.saturation = settings.saturation + 1; SetPreviewBitmap(bm); }
BOOL PreviewFilterPNG::DoExport(Operation* pOp, CCLexFile* pFile, PathName* pPath, Document* TheDocument, BOOL ShowOptions) { INT32 OldPreviewSize = PreviewFilter::PreviewBitmapSize; // Set the Preview to be just over an inch accross PreviewFilter::PreviewBitmapSize = 96000; // set ourselves up - this flags the BaseBitmapFilter to do resizing, which needs to be // done there because of Accusoft. SetPreviewBitmap(TRUE); // Export the Preview to the file by doing what our base class does BOOL ok = PNGFilter::DoExport(pOp, pFile, pPath, TheDocument, TRUE); // Set ourselves back SetPreviewBitmap(FALSE); // Set the Preview back to its default setting PreviewFilter::PreviewBitmapSize = OldPreviewSize; return ok; }