synfig-core  1.0.3
Public Types | Public Member Functions | Static Public Member Functions | List of all members
synfig::Target_Cairo_Tile Class Reference

This is a Target class that implements the render fucntion for a CairoSurface using tile mode. More...

#include <target_cairo_tile.h>

Inheritance diagram for synfig::Target_Cairo_Tile:
synfig::Target

Public Types

typedef etl::handle
< Target_Cairo_Tile
Handle
typedef etl::loose_handle
< Target_Cairo_Tile
LooseHandle
typedef etl::handle< const
Target_Cairo_Tile
ConstHandle
- Public Types inherited from synfig::Target
typedef etl::handle< TargetHandle
typedef etl::loose_handle< TargetLooseHandle
typedef etl::handle< const TargetConstHandle
typedef Target *(* Factory )(const char *filename, TargetParam p)
 Type that represents a pointer to a Target's constructor.
typedef std::map< String,
BookEntry
Book
 Book of types of targets indexed by the name of the Target.
typedef std::map< String, StringExtBook
 Book of types of targets indexed by the file extension.

Public Member Functions

 Target_Cairo_Tile ()
 Default constructor (current frame = 0)
virtual bool render (ProgressCallback *cb=NULL)
 Renders the canvas to the target.
virtual int next_tile (int &x, int &y)
 Determines which tile needs to be rendered next.
virtual int next_frame (Time &time)
virtual bool add_tile (cairo_surface_t *surface, int x, int y)=0
 Adds the tile at x , y contained in surface.
virtual int total_tiles () const
 Returns the total tiles of the imaged rounded to integer number of tiles.
void set_threads (int x)
 Sets the number of threads.
int get_threads () const
 Gets the number of threads.
void set_tile_w (int w)
 Sets the tile widht.
int get_tile_w () const
 Gets the tile widht.
void set_tile_h (int h)
 Sets the tile height.
int get_tile_h () const
 Gets the tile height.
bool get_clipping () const
 Gets clipping.
void set_clipping (bool x)
 Sets clipping.
virtual bool start_frame (ProgressCallback *cb=NULL)=0
 Marks the start of a frame.
virtual void end_frame ()=0
 Marks the end of a frame.
- 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.
virtual bool set_rend_desc (RendDesc *d)
 Sets the RendDesc for the Target to desc.
virtual bool init (ProgressCallback *cb=NULL)
 Initialization tasks of the derived target.

Static Public Member Functions

static void gamma_filter (cairo_surface_t *surface, const synfig::Gamma gamma)
 Filters the cairo surface based on gamma (hardcored for the moment to 2.2)
- 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.

Additional Inherited Members

- 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

This is a Target class that implements the render fucntion for a CairoSurface using tile mode.

Member Typedef Documentation

Constructor & Destructor Documentation

Target_Cairo_Tile::Target_Cairo_Tile ( )

Default constructor (current frame = 0)

References synfig::Target::curr_frame_.

Member Function Documentation

bool synfig::Target_Cairo_Tile::render ( ProgressCallback cb = NULL)
virtual
int Target_Cairo_Tile::next_tile ( int &  x,
int &  y 
)
virtual

Determines which tile needs to be rendered next.

Most cases will not have to redefine this function. The default should be adequate in nearly all situations.

Returns
The number of tiles left to go plus one. This means that whenever this function returns zero, there are no more tiles to render and that any value in x or y should be disregarded.

References synfig::Target::rend_desc().

int Target_Cairo_Tile::next_frame ( Time time)
virtual

Returns the number of peniding frames to render. If it is zero it stops rendering frames.

Reimplemented from synfig::Target.

virtual bool synfig::Target_Cairo_Tile::add_tile ( cairo_surface_t *  surface,
int  x,
int  y 
)
pure virtual

Adds the tile at x , y contained in surface.

virtual int synfig::Target_Cairo_Tile::total_tiles ( ) const
inlinevirtual

Returns the total tiles of the imaged rounded to integer number of tiles.

References synfig::Target::rend_desc().

void synfig::Target_Cairo_Tile::set_threads ( int  x)
inline

Sets the number of threads.

int synfig::Target_Cairo_Tile::get_threads ( ) const
inline

Gets the number of threads.

void synfig::Target_Cairo_Tile::set_tile_w ( int  w)
inline

Sets the tile widht.

int synfig::Target_Cairo_Tile::get_tile_w ( ) const
inline

Gets the tile widht.

void synfig::Target_Cairo_Tile::set_tile_h ( int  h)
inline

Sets the tile height.

int synfig::Target_Cairo_Tile::get_tile_h ( ) const
inline

Gets the tile height.

bool synfig::Target_Cairo_Tile::get_clipping ( ) const
inline

Gets clipping.

void synfig::Target_Cairo_Tile::set_clipping ( bool  x)
inline

Sets clipping.

virtual bool synfig::Target_Cairo_Tile::start_frame ( ProgressCallback cb = NULL)
pure virtual

Marks the start of a frame.

Returns
true on success, false upon an error.
See Also
end_frame()
virtual void synfig::Target_Cairo_Tile::end_frame ( )
pure virtual

Marks the end of a frame.

See Also
start_frame()
void Target_Cairo_Tile::gamma_filter ( cairo_surface_t *  surface,
const synfig::Gamma  gamma 
)
static

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