00001 // Filename: imageFilter.cxx 00002 // Created by: drose (19Jun00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "imageFilter.h" 00020 00021 //////////////////////////////////////////////////////////////////// 00022 // Function: ImageFilter::Constructor 00023 // Access: Public 00024 // Description: 00025 //////////////////////////////////////////////////////////////////// 00026 ImageFilter:: 00027 ImageFilter(bool allow_last_param) : 00028 ImageWriter(allow_last_param) 00029 { 00030 clear_runlines(); 00031 if (_allow_last_param) { 00032 add_runline("[opts] inputimage outputimage"); 00033 } 00034 add_runline("[opts] -o outputimage inputimage"); 00035 } 00036 00037 //////////////////////////////////////////////////////////////////// 00038 // Function: ImageFilter::handle_args 00039 // Access: Protected, Virtual 00040 // Description: Does something with the additional arguments on the 00041 // command line (after all the -options have been 00042 // parsed). Returns true if the arguments are good, 00043 // false otherwise. 00044 //////////////////////////////////////////////////////////////////// 00045 bool ImageFilter:: 00046 handle_args(ProgramBase::Args &args) { 00047 if (!check_last_arg(args, 1)) { 00048 return false; 00049 } 00050 00051 return ImageReader::handle_args(args); 00052 }