Panda3D

Public Member Functions | List of all members
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:

## Public Member Functions
| ImageWriter (bool allow_last_param)
| Image-writing type programs *must* specify their output file using -o. More...
void | write_image ()
| Writes the generated to the user's specified output filename. More...
void | write_image (const PNMImage &image)
| Writes the generated to the user's specified output filename. More...
Public Member Functions inherited from ProgramBase
| ProgramBase (const std::string &name=std::string())
std::string | get_exec_command () const
| Returns the command that invoked this program, as a shell-friendly string, suitable for pasting into the comments of output files. More...
virtual void | parse_command_line (int argc, char **argv)
| Dispatches on each of the options on the command line, and passes the remaining parameters to handle_args(). More...
void | show_description ()
| Writes the program description to stderr. More...
void | show_options ()
| Describes each of the available options to stderr. More...
void | show_text (const std::string &prefix, int indent_width, std::string text)
| Formats the indicated text and its prefix for output to stderr with the known _terminal_width. More...
void | show_text (const std::string &text)
| Formats the indicated text to stderr with the known _terminal_width. More...
void | show_usage ()
| Writes the usage line(s) to stderr. More...
void | write_man_page (std::ostream &out)
| Generates a man page in nroff syntax based on the description and options. More...
Public Member Functions inherited from WithOutputFile
| WithOutputFile (bool allow_last_param, bool allow_stdout, bool binary_output)
void | close_output ()
| Closes the output stream previously opened by get_output(). More...
std::ostream & | get_output ()
| Returns an output stream that corresponds to the user's intended egg file output–either stdout, or the named output file. More...
Filename | get_output_filename () const
| If has_output_filename() returns true, this is the filename that the user specified. More...
bool | has_output_filename () const
| Returns true if the user specified an output filename, false otherwise (e.g. More...

## Additional Inherited Members
Public Types inherited from ProgramBase
typedef pdeque< std::string > | Args
Public Attributes inherited from ProgramBase
Args | _program_args
Filename | _program_name

## 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 27 of file imageWriter.h.

## Constructor & Destructor Documentation

## ◆ ImageWriter()

ImageWriter::ImageWriter | ( | bool | allow_last_param | ) |

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

Definition at line 19 of file imageWriter.cxx.

## Member Function Documentation

## ◆ write_image() [1/2]

void ImageWriter::write_image | ( |  | ) |
| inline

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

Definition at line 17 of file imageWriter.I.

## ◆ write_image() [2/2]

void ImageWriter::write_image | ( | const PNMImage & | image | ) |

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

Definition at line 49 of file imageWriter.cxx.

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

The documentation for this class was generated from the following files:

- pandatool/src/imagebase/imageWriter.h
- pandatool/src/imagebase/imageWriter.cxx
- pandatool/src/imagebase/imageWriter.I