#include <HxMfResize.h>
Public Methods | |
HxMfResize (HxImageData *objImg, HxSizes newSize, HxImageData *argImg=0) | |
Constructor. More... | |
~HxMfResize () | |
Destructor. More... | |
HxImageData * | object () const |
The object image of the frame. More... | |
HxImageData * | argument () const |
The argument image of the frame. More... | |
HxImageData * | result () const |
The result image of the frame. More... |
The method frame is used when the resulting image has a different size than the operand image.
|
Constructor. Object() and result() will point to an empty image with the signature of objImg and the specified sizes. In case the signature of argImg is not equal to the signature of object() a temporary image with that signature will be created for argument() with the same pixel values as argImg.
00017 : _object(objImg), _argument(argImg), _tmpArg(0) 00018 { 00019 if (!_object) 00020 return; 00021 00022 HxImageSignature objSig(_object->signature()); 00023 00024 if (_argument) { 00025 HxImageSignature argSig(_argument->signature()); 00026 if (!argSig.isEqual(objSig)) { 00027 _tmpArg = HxImgDataFactory::instance().makeImage(objSig, newSize); 00028 _tmpArg->set(_argument); 00029 _argument = _tmpArg; 00030 } 00031 } 00032 00033 _result = HxImgDataFactory::instance().makeImage(objSig, newSize); 00034 // if (_result) 00035 // _result->set(_object); 00036 _object = _result; 00037 } |
|
Destructor.
00040 { 00041 if (_tmpArg) 00042 delete _tmpArg; 00043 } |
|
The object image of the frame.
00047 { 00048 return _object; 00049 } |
|
The argument image of the frame.
00053 { 00054 return _argument; 00055 } |
|
The result image of the frame.
00059 { 00060 return _result; 00061 } |