Panda3D
Public Member Functions | Protected Member Functions

ImageWriter Class Reference

This is the base class for a program that generates an image file output, but doesn't read any for input. More...

#include "imageWriter.h"

Inheritance diagram for ImageWriter:
ImageBase WithOutputFile ProgramBase ImageFilter ImageFixHiddenColor ImageResize ImageTrans

List of all members.

Public Member Functions

 ImageWriter (bool allow_last_param)
 Image-writing type programs *must* specify their output file using -o.
void write_image (const PNMImage &image)
 Writes the generated to the user's specified output filename.
void write_image ()
 Writes the generated to the user's specified output filename.

Protected Member Functions

virtual bool handle_args (Args &args)
 Does something with the additional arguments on the command line (after all the -options have been parsed).

Detailed Description

This is the base class for a program that generates an image file output, but doesn't read any for input.

Definition at line 29 of file imageWriter.h.


Constructor & Destructor Documentation

ImageWriter::ImageWriter ( bool  allow_last_param)

Image-writing type programs *must* specify their output file using -o.

Definition at line 24 of file imageWriter.cxx.

References ProgramBase::add_option(), ProgramBase::add_runline(), ProgramBase::clear_runlines(), and ProgramBase::dispatch_filename().


Member Function Documentation

bool ImageWriter::handle_args ( ProgramBase::Args &  args) [protected, virtual]

Does something with the additional arguments on the command line (after all the -options have been parsed).

Returns true if the arguments are good, false otherwise.

Reimplemented from ProgramBase.

Reimplemented in ImageFilter.

Definition at line 74 of file imageWriter.cxx.

References WithOutputFile::check_last_arg().

void ImageWriter::write_image ( ) [inline]

Writes the generated to the user's specified output filename.

Definition at line 23 of file imageWriter.I.

void ImageWriter::write_image ( const PNMImage image)

Writes the generated to the user's specified output filename.

Definition at line 57 of file imageWriter.cxx.

References WithOutputFile::get_output_filename(), and PNMImage::write().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations