# yuv Class Reference

`#include <trgt_yuv.h>`

Inheritance diagram for yuv:

List of all members.

## Public Member Functions

| yuv (const char *filename)
virtual | ~yuv ()
virtual bool | init ()
virtual bool | set_rend_desc (synfig::RendDesc *desc)
| Sets the RendDesc for the Target to desc.
virtual bool | start_frame (synfig::ProgressCallback *cb)
| Marks the start of a frame.
virtual void | end_frame ()
| Marks the end of a frame.
virtual synfig::Color * | start_scanline (int scanline)
| Marks the start of a scanline.
virtual bool | end_scanline ()
| Marks the end of a scanline.

## Constructor & Destructor Documentation

yuv::yuv | ( | const char * | filename | ) |

References synfig::Target::set_remove_alpha().

yuv::~yuv | ( |  | ) | `[virtual]`

## Member Function Documentation

bool yuv::init | ( |  | ) | `[virtual]`

Reimplemented from synfig::Target.

References synfig::Target::desc, synfig::RendDesc::get_frame_rate(), synfig::RendDesc::get_h(), and synfig::RendDesc::get_w().

bool yuv::set_rend_desc | ( | synfig::RendDesc * | d | ) | `[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 from synfig::Target.

References synfig::RendDesc::clear_flags(), synfig::Target::desc, synfig::RendDesc::get_h(), synfig::RendDesc::get_w(), synfig::RendDesc::set_h(), and synfig::RendDesc::set_w().

bool yuv::start_frame | ( | synfig::ProgressCallback * | cb | ) | `[virtual]`

Marks the start of a frame.

Returns:
  `true` on success, `false` upon an error.

See also:
  end_frame(), start_scanline()

Implements synfig::Target_Scanline.

void yuv::end_frame | ( |  | ) | `[virtual]`

Marks the end of a frame.

See also:
  start_frame()

Implements synfig::Target_Scanline.

References synfig::Color::clamped(), synfig::Target::desc, synfig::error(), f, synfig::Target::gamma(), synfig::Color::get_b(), synfig::Color::get_g(), synfig::RendDesc::get_h(), synfig::Color::get_r(), synfig::Color::get_u(), synfig::Color::get_v(), synfig::RendDesc::get_w(), synfig::Color::get_y(), synfig::Color::set_b(), synfig::Color::set_g(), synfig::Color::set_r(), UV_FLOOR, UV_RANGE, Y_FLOOR, and Y_RANGE.

Color * yuv::start_scanline | ( | int | scanline | ) | `[virtual]`

Marks the start of a scanline.

Parameters:

  | scanline | Which scanline is going to be rendered.

Returns:
  The address where the target wants the scanline to be written.

Warning:
  Must be called after start_frame()

See also:
  end_scanline(), start_frame()

Implements synfig::Target_Scanline.

bool yuv::end_scanline | ( |  | ) | `[virtual]`

Marks the end of a scanline.

Takes the data that was put at the address returned to by start_scanline() and does whatever it is supposed to do with it.

Returns:
  `true` on success, `false` on failure.

See also:
  start_scanline()

Implements synfig::Target_Scanline.

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

- trgt_yuv.h
- trgt_yuv.cpp