# synfig::Target Class Reference

Render-target. More...

`#include <target.h>`

Inheritance diagram for synfig::Target:

List of all members.

## Public Types

typedef etl::handle< Target > | Handle
typedef etl::loose_handle< Target > | LooseHandle
typedef etl::handle< const Target > | ConstHandle
typedef Target *(* | Factory )(const char *filename)
typedef std::map< String, std::pair< Factory, String > > | Book
| A type for a map of targets, indexed by the name of the Target.
typedef std::map< String, String > | ExtBook

## Public Member Functions

sigc::signal< void > & | signal_progress ()
virtual | ~Target ()
int | get_quality () const
void | set_quality (int q)
void | set_avoid_time_sync (bool x=true)
bool | get_avoid_time_sync () const
bool | get_remove_alpha () const
void | set_remove_alpha (bool x=true)
Gamma & | gamma ()
const Gamma & | gamma () const
virtual void | set_canvas (etl::handle< Canvas > c)
const etl::handle< Canvas > & | get_canvas () const
RendDesc & | rend_desc ()
const RendDesc & | rend_desc () const
virtual bool | render (ProgressCallback *cb=NULL)=0
| Renders the canvas to the target.
virtual bool | set_rend_desc (RendDesc *d)
| Sets the RendDesc for the Target to desc.
virtual bool | init ()

## Static Public Member Functions

static Book & | book ()
static ExtBook & | ext_book ()
static bool | subsys_init ()
static bool | subsys_stop ()
static Handle | create (const String &type, const String &filename)
| Creates a new Target described by type, outputting to a file described by filename.

## Public Attributes

RendDesc | desc
| Adjusted Render description set by set_rend_desc().
etl::handle< Canvas > | canvas
int | quality_
Gamma | gamma_
bool | remove_alpha
bool | avoid_time_sync_

## Static Public Attributes

static Book * | book_
| Target Book, indexed by the target's name.
static ExtBook * | ext_book_
| Map of target names indexed by associated file extension.

## Protected Member Functions

| Target ()

## Detailed Description

Render-target.

Todo:
  writeme

## Member Typedef Documentation

typedef etl::handle<Target> synfig::Target::Handle

Reimplemented in synfig::Target_Scanline, and synfig::Target_Tile.

typedef etl::loose_handle<Target> synfig::Target::LooseHandle

Reimplemented in synfig::Target_Scanline, and synfig::Target_Tile.

typedef etl::handle<const Target> synfig::Target::ConstHandle

Reimplemented in synfig::Target_Scanline, and synfig::Target_Tile.

typedef Target*(* synfig::Target::Factory)(const char *filename)

typedef std::map<String,std::pair<Factory,String> > synfig::Target::Book

A type for a map of targets, indexed by the name of the Target.

typedef std::map<String,String> synfig::Target::ExtBook

## Constructor & Destructor Documentation

Target::Target | ( |  | ) | `[protected]`

virtual synfig::Target::~Target | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

sigc::signal<void>& synfig::Target::signal_progress | ( |  | ) | `[inline]`

Target::Book & Target::book | ( |  | ) | `[static]`

References book_.

Referenced by create(), process_global_flags(), and subsys_init().

Target::ExtBook & Target::ext_book | ( |  | ) | `[static]`

References ext_book_.

Referenced by subsys_init().

bool Target::subsys_init | ( |  | ) | `[static]`

References book(), book_, synfig::Target_Null_Tile::create(), synfig::Target_Null::create(), ext_book(), and ext_book_.

Referenced by synfig::Main::Main().

bool Target::subsys_stop | ( |  | ) | `[static]`

References book_, and ext_book_.

Referenced by synfig::Main::Main(), and synfig::Main::~Main().

int synfig::Target::get_quality | ( |  | ) | const`[inline]`

References quality_.

Referenced by gif::init(), and synfig::Target_Scanline::render().

void synfig::Target::set_quality | ( | int | q | ) | `[inline]`

References quality_.

void synfig::Target::set_avoid_time_sync | ( | bool | x = `true` | ) | `[inline]`

References avoid_time_sync_.

bool synfig::Target::get_avoid_time_sync | ( |  | ) | const`[inline]`

References avoid_time_sync_.

Referenced by synfig::Target_Scanline::render().

bool synfig::Target::get_remove_alpha | ( |  | ) | const`[inline]`

References remove_alpha.

Referenced by synfig::Target_Scanline::add_frame(), gif::end_frame(), and synfig::Target_Scanline::render().

void synfig::Target::set_remove_alpha | ( | bool | x = `true` | ) | `[inline]`

References remove_alpha.

Referenced by bmp::bmp(), dv_trgt::dv_trgt(), ffmpeg_trgt::ffmpeg_trgt(), jpeg_trgt::jpeg_trgt(), ppm::ppm(), Target_LibAVCodec::Target_LibAVCodec(), and yuv::yuv().

Gamma& synfig::Target::gamma | ( |  | ) | `[inline]`

References gamma_.

Referenced by yuv::end_frame(), Target_LibAVCodec::end_frame(), ppm::end_scanline(), png_trgt::end_scanline(), mng_trgt::end_scanline(), magickpp_trgt::end_scanline(), jpeg_trgt::end_scanline(), imagemagick_trgt::end_scanline(), ffmpeg_trgt::end_scanline(), dv_trgt::end_scanline(), bmp::end_scanline(), exr_trgt::exr_trgt(), mng_trgt::init(), and png_trgt::start_frame().

const Gamma& synfig::Target::gamma | ( |  | ) | const`[inline]`

References gamma_.

void synfig::Target::set_canvas | ( | etl::handle< Canvas > | c | ) | `[virtual]`

Reimplemented in synfig::Target_Multi.

References canvas, desc, and set_rend_desc().

const etl::handle<Canvas>& synfig::Target::get_canvas | ( |  | ) | const`[inline]`

References canvas.

Referenced by gif::end_frame(), mng_trgt::init(), ffmpeg_trgt::init(), and png_trgt::start_frame().

RendDesc& synfig::Target::rend_desc | ( |  | ) | `[inline]`

References desc.

Referenced by gif::end_frame(), synfig::Target_Tile::next_tile(), bmp::start_frame(), and synfig::Target_Tile::total_tiles().

const RendDesc& synfig::Target::rend_desc | ( |  | ) | const`[inline]`

References desc.

virtual bool synfig::Target::render | ( | ProgressCallback * | cb = `NULL` | ) | `[pure virtual]`

Renders the canvas to the target.

Implemented in synfig::Target_Scanline, and synfig::Target_Tile.

virtual bool synfig::Target::set_rend_desc | ( | RendDesc * | d | ) | `[inline, virtual]`

Sets the RendDesc for the Target to desc.

If there are any parts of desc that the render target is not capable of doing, the render target will adjust desc to fit its needs.

Reimplemented in bmp, dv_trgt, ffmpeg_trgt, gif, imagemagick_trgt, jpeg_trgt, Target_LibAVCodec, magickpp_trgt, mng_trgt, exr_trgt, png_trgt, bsd_mpeg1, ppm, yuv, and synfig::Target_Multi.

References desc.

Referenced by set_canvas(), and bsd_mpeg1::set_rend_desc().

virtual bool synfig::Target::init | ( |  | ) | `[inline, virtual]`

Reimplemented in dv_trgt, ffmpeg_trgt, gif, imagemagick_trgt, Target_LibAVCodec, magickpp_trgt, mng_trgt, yuv, and synfig::Target_Multi.

Referenced by synfig::Target_Tile::render(), and synfig::Target_Scanline::render().

Target::Handle Target::create | ( | const String & | type,
|  | const String & | filename |
| ) |  |  | `[static]`

Creates a new Target described by type, outputting to a file described by filename.

References book().

Referenced by main().

## Member Data Documentation

synfig::Target::Book * synfig::Target::book_ `[static]`

Target Book, indexed by the target's name.

Referenced by book(), subsys_init(), and subsys_stop().

synfig::Target::ExtBook * synfig::Target::ext_book_ `[static]`

Map of target names indexed by associated file extension.

Referenced by ext_book(), subsys_init(), and subsys_stop().

RendDesc synfig::Target::desc

Adjusted Render description set by set_rend_desc().

Referenced by synfig::Target_Scanline::add_frame(), yuv::end_frame(), exr_trgt::end_frame(), gif::end_frame(), ppm::end_scanline(), png_trgt::end_scanline(), exr_trgt::end_scanline(), mng_trgt::end_scanline(), jpeg_trgt::end_scanline(), imagemagick_trgt::end_scanline(), ffmpeg_trgt::end_scanline(), dv_trgt::end_scanline(), bmp::end_scanline(), synfig::Target_Multi::end_scanline(), yuv::init(), mng_trgt::init(), magickpp_trgt::init(), imagemagick_trgt::init(), gif::init(), ffmpeg_trgt::init(), dv_trgt::init(), synfig::Target_Tile::next_frame(), synfig::Target_Scanline::next_frame(), rend_desc(), synfig::Target_Tile::render(), synfig::Target_Scanline::render(), synfig::Target_Multi::set_canvas(), set_canvas(), yuv::set_rend_desc(), ppm::set_rend_desc(), png_trgt::set_rend_desc(), exr_trgt::set_rend_desc(), bsd_mpeg1::set_rend_desc(), mng_trgt::set_rend_desc(), magickpp_trgt::set_rend_desc(), jpeg_trgt::set_rend_desc(), imagemagick_trgt::set_rend_desc(), gif::set_rend_desc(), ffmpeg_trgt::set_rend_desc(), dv_trgt::set_rend_desc(), bmp::set_rend_desc(), Target_LibAVCodec::set_rend_desc(), synfig::Target_Multi::set_rend_desc(), set_rend_desc(), ppm::start_frame(), png_trgt::start_frame(), exr_trgt::start_frame(), jpeg_trgt::start_frame(), imagemagick_trgt::start_frame(), ffmpeg_trgt::start_frame(), dv_trgt::start_frame(), bmp::start_frame(), synfig::Target_Null::start_frame(), and magickpp_trgt::~magickpp_trgt().

etl::handle<Canvas> synfig::Target::canvas

Referenced by get_canvas(), synfig::Target_Tile::render(), synfig::Target_Scanline::render(), synfig::Target_Multi::set_canvas(), and set_canvas().

int synfig::Target::quality_

Referenced by get_quality(), and set_quality().

Gamma synfig::Target::gamma_

Referenced by gamma().

bool synfig::Target::remove_alpha

Referenced by get_remove_alpha(), and set_remove_alpha().

bool synfig::Target::avoid_time_sync_

Referenced by get_avoid_time_sync(), and set_avoid_time_sync().

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

- target.h
- target.cpp