Main Page   Class Overview   Pixels   Images   Geometry   Quick Index  

HxMfResize Class Reference

Class definition of method frame for resizing of image. More...

#include <HxMfResize.h>

List of all members.

Public Methods

 HxMfResize (HxImageData *objImg, HxSizes newSize, HxImageData *argImg=0)
 Constructor. More...

 ~HxMfResize ()
 Destructor. More...

HxImageDataobject () const
 The object image of the frame. More...

HxImageDataargument () const
 The argument image of the frame. More...

HxImageDataresult () const
 The result image of the frame. More...


Detailed Description

Class definition of method frame for resizing of image.

The method frame is used when the resulting image has a different size than the operand image.


Constructor & Destructor Documentation

HxMfResize::HxMfResize HxImageData   objImg,
HxSizes    newSize,
HxImageData   argImg = 0
 

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 }

HxMfResize::~HxMfResize  
 

Destructor.

00040 {
00041     if (_tmpArg) 
00042         delete _tmpArg;
00043 }


Member Function Documentation

HxImageData * HxMfResize::object   const
 

The object image of the frame.

00047 { 
00048     return _object; 
00049 }

HxImageData * HxMfResize::argument   const
 

The argument image of the frame.

00053 { 
00054     return _argument; 
00055 }

HxImageData * HxMfResize::result   const
 

The result image of the frame.

00059 { 
00060     return _result; 
00061 }


The documentation for this class was generated from the following files:
Generated on Tue Jan 8 13:59:33 2002 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001