1 /***********************************************************************/
2 /* Open Visualization Data Explorer                                    */
3 /* (C) Copyright IBM Corp. 1989,1999                                   */
4 /* ALL RIGHTS RESERVED                                                 */
5 /* This code licensed under the                                        */
6 /*    "IBM PUBLIC LICENSE - Open Visualization Data Explorer"          */
7 /***********************************************************************/
8 
9 #include <dxconfig.h>
10 #include "../base/defines.h"
11 
12 
13 
14 
15 #include "ImageApproxCommand.h"
16 #include "ImageWindow.h"
17 
ImageApproxCommand(const char * name,CommandScope * scope,boolean active,ImageWindow * w,boolean up,ApproxMode mode)18 ImageApproxCommand::ImageApproxCommand(const char   *name,
19 						 CommandScope *scope,
20 						 boolean       active,
21 						 ImageWindow  *w,
22 						 boolean    up,
23 						 ApproxMode mode):
24     NoUndoCommand(name, scope, active)
25 {
26     this->imageWindow = w;
27     this->up = up;
28     this->mode = mode;
29 }
30 
doIt(CommandInterface * ci)31 boolean ImageApproxCommand::doIt(CommandInterface *ci)
32 {
33     this->imageWindow->setApproximation(this->up, this->mode);
34     return TRUE;
35 }
36