#include <HxMfResize.h>
Public Methods | |
HxMfResize (HxImageData *src, HxSizes newSize, HxImageData *argImg=0) | |
Constructor. More... | |
~HxMfResize () | |
Destructor. More... | |
HxImageData * | source () const |
The source 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.
result() will point to an empty image with the signature of src and the specified sizes. In case the signature of argImg is not equal to the signature of src a temporary image with that signature will be created for argument() with the same pixel values as argImg.
|
Constructor.
00017 : _source(src), _argument(argImg), _tmpArg(0) 00018 { 00019 if (!_source) 00020 return; 00021 00022 HxImageSignature srcSig(_source->signature()); 00023 00024 if (_argument) { 00025 HxImageSignature argSig(_argument->signature()); 00026 if (!argSig.isEqual(srcSig)) { 00027 _tmpArg = HxImgDataFactory::instance().makeImage(srcSig, newSize); 00028 _tmpArg->set(_argument); 00029 _argument = _tmpArg; 00030 } 00031 } 00032 00033 _result = HxImgDataFactory::instance().makeImage(srcSig, newSize); 00034 // if (_result) 00035 // _result->set(_source); 00036 } |
|
Destructor.
00039 { 00040 if (_tmpArg) 00041 delete _tmpArg; 00042 } |
|
The source image of the frame.
00046 { 00047 return _source; 00048 } |
|
The argument image of the frame.
00052 { 00053 return _argument; 00054 } |
|
The result image of the frame.
00058 { 00059 return _result; 00060 } |