#include <prvwflt.h>
Inheritance diagram for PreviewFilterJPEG:
Public Member Functions | |
PreviewFilterJPEG () | |
Constructor for an PreviewFilterJPEG object. The object should be initialised before use. | |
BOOL | Init () |
Initialise an PreviewFilter object. | |
virtual BOOL | DoExport (Operation *, CCLexFile *, PathName *, Document *, BOOL) |
Do some set up before exporting so the BaseBitmapFilter base class knows it is really a preview. The BaseBitmapFilter can then do resizing as necessary. | |
Protected Member Functions | |
virtual BOOL | GetExportOptions (BitmapExportOptions *pOptions) |
Override base class so we don't put up a dialog but still provide fixed options for preview bitmap filters. Notes: See BaseBitmapFilter for interface details. | |
Private Member Functions | |
CC_DECLARE_MEMDUMP (PreviewFilterJPEG) |
Definition at line 221 of file prvwflt.h.
|
Constructor for an PreviewFilterJPEG object. The object should be initialised before use. / /*!
Definition at line 626 of file prvwflt.cpp. 00626 : JPEGExportFilter() 00627 { 00628 ImportMsgID = _R(IDN_IMPORTMSG_JPEG); 00629 00630 // Set it up so that it can neither Import or Export so that it does not appear in the 00631 // Filter menus. 00632 Flags.CanImport = FALSE; 00633 Flags.CanExport = FALSE; 00634 FilterID = FILTERID_PREVIEW_JPEG; 00635 00636 ExportRegion = NULL; 00637 ExportMsgID = _R(IDS_BUILDINGPREVIEW); 00638 ExportingMsgID = _R(IDS_BUILDINGPREVIEW); 00639 }
|
|
|
|
Do some set up before exporting so the BaseBitmapFilter base class knows it is really a preview. The BaseBitmapFilter can then do resizing as necessary.
Reimplemented from BaseBitmapFilter. Definition at line 686 of file prvwflt.cpp. 00688 { 00689 INT32 OldPreviewSize = PreviewFilter::PreviewBitmapSize; 00690 // Set the Preview to be just over an inch accross 00691 PreviewFilter::PreviewBitmapSize = 96000; 00692 00693 // set ourselves up - this flags the BaseBitmapFilter to do resizing, which needs to be 00694 // done there because of Accusoft. 00695 SetPreviewBitmap(TRUE); 00696 00697 // Export the Preview to the file by doing what our base class does 00698 BOOL ok = JPEGExportFilter::DoExport(pOp, pFile, pPath, TheDocument, TRUE); 00699 00700 // Set ourselves back 00701 SetPreviewBitmap(FALSE); 00702 // Set the Preview back to its default setting 00703 PreviewFilter::PreviewBitmapSize = OldPreviewSize; 00704 00705 return ok; 00706 }
|
|
Override base class so we don't put up a dialog but still provide fixed options for preview bitmap filters. Notes: See BaseBitmapFilter for interface details.
Reimplemented from JPEGExportFilter. Definition at line 720 of file prvwflt.cpp. 00721 { 00722 ERROR2IF(pOptions == NULL, FALSE, "NULL Args"); 00723 ERROR3IF(!pOptions->IS_KIND_OF(JPEGExportOptions), "pOptions isn't a JPEGExportOptions"); 00724 00725 JPEGExportOptions* pJPEGOptions = (JPEGExportOptions*)pOptions; 00726 00727 // the depth we ask GDraw to render is always 32-bit, so we can get transparency 00728 // we have to convert for other formats when writing the actual bytes to the file 00729 SetDepthToRender(32); 00730 00731 // We haven't written the header yet 00732 WrittenHeader = FALSE; 00733 00735 // BitmapExportOptions 00736 // 00737 00738 // this dpi will be used to scale the preview 00739 pJPEGOptions->SetDPI(96.0); 00740 00741 // the export depth of the preview is always 8 00742 pJPEGOptions->SetDepth(8); 00743 00744 // I'm fairly sure this isn't used for anything in WEBSTER-Martin-17/01/97 00745 //PreviewDither = ?; 00746 PreviewPalette = PAL_OPTIMISED; 00747 00749 // JPEGExportOptions 00750 // 00751 00752 // Previews have an optimized palette 00753 PaletteType = PreviewPalette; 00754 00755 return TRUE; 00756 }
|
|
Initialise an PreviewFilter object.
Reimplemented from JPEGExportFilter. Definition at line 654 of file prvwflt.cpp. 00655 { 00656 // Get the OILFilter object 00657 pOILFilter = new JPEGOILFilter(this); 00658 if (pOILFilter==NULL) 00659 return FALSE; 00660 00661 // Load the description strings 00662 FilterName.Load(_R(IDN_JPEG_FILTERNAME)); 00663 FilterInfo.Load(_R(IDN_JPEG_FILTERINFO)); 00664 00665 // All ok 00666 return TRUE; 00667 }
|