#include <prvwflt.h>
Inheritance diagram for ThumbnailFilterPNG:
Public Member Functions | |
ThumbnailFilterPNG () | |
virtual BOOL | DoExport (Operation *pOp, CCLexFile *pFile, PathName *pPath, Document *TheDocument, BOOL ShowOptions) |
Exports a document into a png file. Creates and attaches a DocView to the document before calling the DoExport function of the PNG filter, because it depends on a view being available. Unlike the preview filters no PreviewBitmapSize value is set in this function, so the caller should set it if something different then the default size is required. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (ThumbnailFilterPNG) |
Definition at line 270 of file prvwflt.h.
|
Definition at line 275 of file prvwflt.h. 00275 : PreviewFilterPNG() {};
|
|
|
|
Exports a document into a png file. Creates and attaches a DocView to the document before calling the DoExport function of the PNG filter, because it depends on a view being available. Unlike the preview filters no PreviewBitmapSize value is set in this function, so the caller should set it if something different then the default size is required. / /*!
Reimplemented from PreviewFilterPNG. Definition at line 945 of file prvwflt.cpp. 00947 { 00948 // set ourselves up - this flags the BaseBitmapFilter to do resizing, which needs to be 00949 // done there because of Accusoft. 00950 SetPreviewBitmap(TRUE); 00951 00952 // create a new view for the document 00953 DocView *pView = new DocView(TheDocument); 00954 00955 if (pView && pView->Init()) 00956 { 00957 // set the view as current, but remember the last current one 00958 View *pOldView = View::GetCurrent(); 00959 pView->SetCurrent(); 00960 00961 // Export the thumbnail to the file by doing what our base class does 00962 BOOL ok = PNGFilter::DoExport(pOp, pFile, pPath, TheDocument, TRUE); 00963 00964 // restore the last view 00965 if (pOldView != NULL) 00966 pOldView->SetCurrent(); 00967 else 00968 View::SetNoCurrent(); 00969 00970 // delete our view 00971 delete pView; 00972 00973 return ok; 00974 } 00975 else 00976 return FALSE; // view creation failed 00977 }
|