00001 // Filename: imageFilter.cxx 00002 // Created by: drose (19Jun00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "imageFilter.h" 00016 00017 //////////////////////////////////////////////////////////////////// 00018 // Function: ImageFilter::Constructor 00019 // Access: Public 00020 // Description: 00021 //////////////////////////////////////////////////////////////////// 00022 ImageFilter:: 00023 ImageFilter(bool allow_last_param) : 00024 ImageWriter(allow_last_param) 00025 { 00026 clear_runlines(); 00027 if (_allow_last_param) { 00028 add_runline("[opts] inputimage outputimage"); 00029 } 00030 add_runline("[opts] -o outputimage inputimage"); 00031 } 00032 00033 //////////////////////////////////////////////////////////////////// 00034 // Function: ImageFilter::handle_args 00035 // Access: Protected, Virtual 00036 // Description: Does something with the additional arguments on the 00037 // command line (after all the -options have been 00038 // parsed). Returns true if the arguments are good, 00039 // false otherwise. 00040 //////////////////////////////////////////////////////////////////// 00041 bool ImageFilter:: 00042 handle_args(ProgramBase::Args &args) { 00043 if (!check_last_arg(args, 1)) { 00044 return false; 00045 } 00046 00047 return ImageReader::handle_args(args); 00048 }