synfig-core  1.0.3
Public Member Functions | List of all members
magickpp_trgt Class Reference

#include <trgt_magickpp.h>

Inheritance diagram for magickpp_trgt:
synfig::Target_Scanline synfig::Target

Public Member Functions

 magickpp_trgt (const char *filename, const synfig::TargetParam &params)
virtual ~magickpp_trgt ()
virtual bool set_rend_desc (synfig::RendDesc *desc)
 Sets the RendDesc for the Target to desc.
virtual bool init (synfig::ProgressCallback *cb)
 Initialization tasks of the derived target.
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::Colorstart_scanline (int scanline)
 Marks the start of a scanline.
virtual bool end_scanline ()
 Marks the end of a scanline.
- Public Member Functions inherited from synfig::Target_Scanline
 Target_Scanline ()
 Default constructor (threads = 2 current frame = 0)
virtual bool render (ProgressCallback *cb=NULL)
 Renders the canvas to the target.
virtual int next_frame (Time &time)
void set_threads (int x)
 Sets the number of threads.
int get_threads () const
 Gets the number of threads.
bool add_frame (const synfig::Surface *surface)
 Puts the rendered surface onto the target.
- Public Member Functions inherited from synfig::Target
sigc::signal< void > & signal_progress ()
virtual ~Target ()
int get_quality () const
 Gets the target quality.
void set_quality (int q)
 Sets the target quality.
void set_avoid_time_sync (bool x=true)
 Sets the target avoid time synchronization.
bool get_avoid_time_sync () const
 Gets the target avoid time synchronization.
TargetAlphaMode get_alpha_mode () const
 Tells how to handle alpha.
void set_alpha_mode (TargetAlphaMode x=TARGET_ALPHA_MODE_KEEP)
 Sets how to handle alpha.
Gammagamma ()
const Gammagamma () const
 Sets the target gamma.
virtual void set_canvas (etl::handle< Canvas > c)
 Sets the target canvas. Must be defined by derived targets.
const etl::handle< Canvas > & get_canvas () const
 Gets the target canvas.
RendDescrend_desc ()
 Gets the target particular render description.
const RendDescrend_desc () const
 Gets the target particular render description.

Additional Inherited Members

- Public Types inherited from synfig::Target_Scanline
typedef etl::handle
< Target_Scanline
Handle
typedef etl::loose_handle
< Target_Scanline
LooseHandle
typedef etl::handle< const
Target_Scanline
ConstHandle
- Static Public Member Functions inherited from synfig::Target
static Bookbook ()
static ExtBookext_book ()
static bool subsys_init ()
static bool subsys_stop ()
 Stops the Target module by deleting the book and the extension book.
static Handle create (const String &type, const String &filename, synfig::TargetParam params)
 Creates a new Target described by type, outputting to a file described by filename.
- Public Attributes inherited from synfig::Target
RendDesc desc
 Adjusted Render description set by set_rend_desc()
etl::handle< Canvascanvas
 Canvas being rendered in this target module.
int quality_
 Render quality used for the render process of the target.
Gamma gamma_
 Gamma value used for the render process of the target.
TargetAlphaMode alpha_mode
 Tells how to handle alpha. Used by non alpha supported targets to decide if the background must be filled or not.
bool avoid_time_sync_
 When set to true, the target doesn't sync to canvas time.
int curr_frame_
 The current frame being rendered.
- Static Public Attributes inherited from synfig::Target
static Bookbook_
 Target Book, indexed by the target's name.
static ExtBookext_book_
 Map of target names indexed by associated file extension.
- Protected Member Functions inherited from synfig::Target
 Target ()
 Default constructor.

Detailed Description

======================================================================== Synfig

Copyright (c) 2007 Chris Moore

This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

=== N O T E S ===========================================================


Constructor & Destructor Documentation

magickpp_trgt::magickpp_trgt ( const char *  filename,
const synfig::TargetParam params 
)
inline
magickpp_trgt::~magickpp_trgt ( )
virtual

Member Function Documentation

bool magickpp_trgt::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.

Parameters
dan RendDesc pointer.
Returns
true on success

Reimplemented from synfig::Target.

bool magickpp_trgt::init ( synfig::ProgressCallback cb)
virtual

Initialization tasks of the derived target.

Returns
true if the initialization has no errors

Reimplemented from synfig::Target.

bool magickpp_trgt::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 magickpp_trgt::end_frame ( )
virtual

Marks the end of a frame.

See Also
start_frame()

Implements synfig::Target_Scanline.

Color * magickpp_trgt::start_scanline ( int  scanline)
virtual

Marks the start of a scanline.

Parameters
scanlineWhich 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 magickpp_trgt::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.

References synfig::convert_color_format(), synfig::PF_A, and synfig::PF_RGB.


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