#include <bfxitem.h>
Inheritance diagram for BfxPlugIn:
Public Member Functions | |
BfxPlugIn () | |
Constructor for BfxPlugIn. | |
~BfxPlugIn () | |
Destructor for BfxPlugIn. | |
virtual String_32 | GetUniqueID () const |
A string which defines the unique identifier for the plug-ins that this handler is interested in. In this case being Bfx it is 'BFX:'. | |
virtual TypeOfPlugIn | GetTypeOfPlugIn () const |
A unique type for the plug-ins that this handler is interested in. In this case being Bfx it is PLUGIN_BFX. | |
virtual OpDescriptor * | GetOpDescriptor ()=0 |
virtual BOOL | Apply (KernelBitmap *pInputBitmap, Document *pDocument, KernelBitmap **ppOutputBitmap=NULL) |
Applies a plug-in's bitmap effect to the specified bitmap. | |
virtual BOOL | IsBitmapModeOk (INT32 ColourDepth, BOOL GreyScale) |
Checks to see if a plug-in can cope with the specified colour depth. | |
Protected Member Functions | |
virtual BOOL | ApplyBitmapEffect (KernelBitmap *pInputBitmap, Document *pDocument, KernelBitmap **ppOutputBitmap=NULL) |
Applies a plug-in's bitmap effect to the specified bitmap. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (BfxPlugIn) |
Definition at line 122 of file bfxitem.h.
|
Constructor for BfxPlugIn.
Definition at line 137 of file bfxitem.cpp.
|
|
Destructor for BfxPlugIn.
Definition at line 151 of file bfxitem.cpp.
|
|
Applies a plug-in's bitmap effect to the specified bitmap.
Reimplemented from PlugInItem. Definition at line 205 of file bfxitem.cpp. 00207 { 00208 ERROR2IF(pInputBitmap == NULL, FALSE, "BfxPlugIn::Apply null bitmap specified!"); 00209 ERROR2IF(pDocument == NULL, FALSE, "BfxPlugIn::Apply null document specified!"); 00210 00211 KernelBitmap * pBmp = NULL; 00212 BOOL ok = ApplyBitmapEffect(pInputBitmap, pDocument, &pBmp); 00213 00214 if (ppOutputBitmap) 00215 *ppOutputBitmap = pBmp; 00216 00217 return ok; 00218 }
|
|
Applies a plug-in's bitmap effect to the specified bitmap.
Definition at line 255 of file bfxitem.cpp. 00257 { 00258 ERROR2IF(pInputBitmap == NULL, FALSE, "BfxPlugIn::Apply null bitmap specified!"); 00259 00260 if (!pInputBitmap->DestroyXPEInfo()) 00261 return FALSE; 00262 00263 OpParam Param; 00264 Param.Param1 = (INT32)pInputBitmap; 00265 Param.Param2 = (INT32)pDocument; 00266 // give it a variable to return the result i.e. ok/cancel in 00267 BOOL ok = FALSE; 00268 Param.Output = &ok; 00269 // Obtain a pointer to the op descriptor for the create operation 00270 OpDescriptor* pOpDesc = GetOpDescriptor(); 00271 ERROR2IF(pOpDesc==NULL,FALSE,"Failed to find the BfxPlugInDlg OpDescriptor"); 00272 00273 // Only one live instance of the operation is allowed. It's probably a dialog 00274 if (!MessageHandler::MessageHandlerExists(CC_RUNTIME_CLASS(BfxPlugInDlg))) 00275 { 00276 pOpDesc->Invoke(&Param); 00277 00278 // **** Warning **** 00279 // This assumes that the dialog box is modal and so the OpParam is still around 00280 // rather than having been deleted 00281 // return the output bitmap to the caller 00282 if (ppOutputBitmap) 00283 *ppOutputBitmap = (KernelBitmap*)Param.Param1; 00284 // return the result i.e. ok/cancel to the caller 00285 return ok; 00286 } 00287 /* else 00288 { 00289 BROADCAST_TO_CLASS(BfxMsg(pBitmap),DialogOp); 00290 } */ 00291 00292 // Everything seemed to work ok 00293 return TRUE; 00294 }
|
|
|
|
Implemented in BfxBrightnessContrast, BfxSpecialEffects, BfxResize, BfxFlipAndRotate, and BfxColourDepth. |
|
A unique type for the plug-ins that this handler is interested in. In this case being Bfx it is PLUGIN_BFX.
Implements PlugInItem. Definition at line 185 of file bfxitem.cpp. 00186 { 00187 return PLUGIN_BFX; 00188 }
|
|
A string which defines the unique identifier for the plug-ins that this handler is interested in. In this case being Bfx it is 'BFX:'.
Implements PlugInItem. Definition at line 168 of file bfxitem.cpp. 00169 { 00170 return TEXT("BFX:"); 00171 }
|
|
Checks to see if a plug-in can cope with the specified colour depth.
Reimplemented from PlugInItem. Definition at line 233 of file bfxitem.cpp. 00234 { 00235 // Passed the checks ok so return TRUE 00236 return TRUE; 00237 }
|