synfig-core  1.0.3
Classes | Namespaces | Macros
layer.h File Reference

Layer Class Header. More...

#include <map>
#include <ETL/handle>
#include "real.h"
#include "string.h"
#include <sigc++/signal.h>
#include <sigc++/connection.h>
#include "node.h"
#include "time.h"
#include "guid.h"
#include "interpolation.h"
#include "target.h"
#include "cairo.h"
#include "rendermethod.h"

Go to the source code of this file.

Classes

class  synfig::Layer
struct  synfig::Layer::BookEntry

Namespaces

namespace  synfig
 Where every function and class of the synfig library can be found.

Macros

#define RENDER_TRANSFORMED_IF_NEED(file, line)
#define SYNFIG_LAYER_MODULE_EXT
#define SYNFIG_LAYER_SET_NAME(class, x)   const char class::name__[]=x
 Sets the name of the layer.
#define SYNFIG_LAYER_SET_LOCAL_NAME(class, x)   const char class::local_name__[]=x;
 Sets the local name of the layer.
#define SYNFIG_LAYER_SET_CATEGORY(class, x)   const char class::category__[]=x
 Sets the category of the layer.
#define SYNFIG_LAYER_SET_VERSION(class, x)   const char class::version__[]=x
 Sets the version string for the layer.
#define SYNFIG_LAYER_SET_CVS_ID(class, x)   const char class::cvs_id__[]=x
 Sets the CVS ID string for the layer.
#define SYNFIG_LAYER_INIT(class)
 Defines de implementation of the create method for the importer.
#define IMPORT_VALUE(x)
 Imports a parameter if it is of the same type as param.
#define IMPORT_VALUE_PLUS_BEGIN(x)
#define IMPORT_VALUE_PLUS_END
#define IMPORT_VALUE_PLUS(x, y)
#define EXPORT_VALUE(x)
 Exports a parameter if it is the same type as value.
#define EXPORT_NAME()
 Exports the name or the local name of the layer.
#define EXPORT_VERSION()
 Exports the version of the layer.
#define CATEGORY_DO_NOT_USE   "Do Not Use"
#define SET_INTERPOLATION_DEFAULTS()
 Sets the interpolation defaults for the layer.
#define SET_STATIC_DEFAULTS()
 Sets the static defaults for the layer.

Detailed Description

Layer Class Header.

$Id$

Macro Definition Documentation

#define RENDER_TRANSFORMED_IF_NEED (   file,
  line 
)
#define SYNFIG_LAYER_MODULE_EXT
Value:
public: \
static const char name__[], version__[], cvs_id__[], local_name__[], category__[]; \
static Layer *create();

Defines various variables and the create method, common for all importers. To be used in the private part of the importer class definition.

#define SYNFIG_LAYER_SET_NAME (   class,
 
)    const char class::name__[]=x

Sets the name of the layer.

#define SYNFIG_LAYER_SET_LOCAL_NAME (   class,
 
)    const char class::local_name__[]=x;

Sets the local name of the layer.

#define SYNFIG_LAYER_SET_CATEGORY (   class,
 
)    const char class::category__[]=x

Sets the category of the layer.

#define SYNFIG_LAYER_SET_VERSION (   class,
 
)    const char class::version__[]=x

Sets the version string for the layer.

#define SYNFIG_LAYER_SET_CVS_ID (   class,
 
)    const char class::cvs_id__[]=x

Sets the CVS ID string for the layer.

#define SYNFIG_LAYER_INIT (   class)
Value:
synfig::Layer* class::create() \
{ \
return new class(); \
}

Defines de implementation of the create method for the importer.

#define IMPORT_VALUE (   x)
Value:
if (#x=="param_"+param && x.get_type()==value.get_type()) \
{ \
x=value; \
return true; \
}

Imports a parameter if it is of the same type as param.

Referenced by Star::import_parameters(), synfig::Layer_Sound::set_param(), Blur_Layer::set_param(), synfig::Layer_Duplicate::set_param(), SuperSample::set_param(), Zoom::set_param(), Layer_Shade::set_param(), synfig::Layer_Stretch::set_param(), InsideOut::set_param(), synfig::Layer_Switch::set_param(), CheckerBoard::set_param(), Translate::set_param(), synfig::Layer_Clamp::set_param(), synfig::Layer_MotionBlur::set_param(), Layer_Stroboscope::set_param(), synfig::Layer_Skeleton::set_param(), SimpleCircle::set_param(), XORPattern::set_param(), RadialBlur::set_param(), Rectangle::set_param(), Rotate::set_param(), Import::set_param(), synfig::Layer_Group::set_param(), Twirl::set_param(), synfig::Layer_ColorCorrect::set_param(), synfig::Layer_SphereDistort::set_param(), synfig::Layer_Bitmap::set_param(), Metaballs::set_param(), SpiralGradient::set_param(), Layer_Bevel::set_param(), ConicalGradient::set_param(), RadialGradient::set_param(), FilledRect::set_param(), Layer_TimeLoop::set_param(), CurveWarp::set_param(), NoiseDistort::set_param(), Halftone2::set_param(), LinearGradient::set_param(), CurveGradient::set_param(), Outline::set_param(), synfig::Layer_Composite::set_param(), Noise::set_param(), Warp::set_param(), Advanced_Outline::set_param(), Mandelbrot::set_param(), Julia::set_param(), synfig::Layer_Shape::set_param(), Plant::set_param(), Layer_Freetype::set_param(), synfig::Layer_PasteCanvas::set_param(), and synfig::Layer::set_param().

#define IMPORT_VALUE_PLUS_BEGIN (   x)
Value:
if (#x=="param_"+param && x.get_type()==value.get_type()) \
{ \
x=value; \
{

Imports a parameter 'x' and perform an action usually based on some condition 'y'

Referenced by Import::set_param().

#define IMPORT_VALUE_PLUS_END
Value:
} \
return true; \
}

Referenced by Import::set_param().

#define IMPORT_VALUE_PLUS (   x,
 
)
#define EXPORT_VALUE (   x)
Value:
if (#x=="param_"+param) \
{ \
ret.copy(x); \
return ret; \
}

Exports a parameter if it is the same type as value.

Referenced by synfig::Layer_Sound::get_param(), synfig::Layer_Duplicate::get_param(), Blur_Layer::get_param(), synfig::Layer_SolidColor::get_param(), SuperSample::get_param(), Zoom::get_param(), InsideOut::get_param(), Layer_Shade::get_param(), synfig::Layer_Stretch::get_param(), Translate::get_param(), synfig::Layer_Switch::get_param(), CheckerBoard::get_param(), synfig::Layer_MotionBlur::get_param(), synfig::Layer_Skeleton::get_param(), Layer_Stroboscope::get_param(), XORPattern::get_param(), synfig::Layer_Clamp::get_param(), RadialBlur::get_param(), SimpleCircle::get_param(), Rectangle::get_param(), Rotate::get_param(), Region::get_param(), Import::get_param(), synfig::Layer_Group::get_param(), Twirl::get_param(), synfig::Layer_ColorCorrect::get_param(), synfig::Layer_SphereDistort::get_param(), Metaballs::get_param(), synfig::Layer_Bitmap::get_param(), Star::get_param(), ConicalGradient::get_param(), SpiralGradient::get_param(), Layer_Bevel::get_param(), RadialGradient::get_param(), Layer_TimeLoop::get_param(), FilledRect::get_param(), CurveWarp::get_param(), synfig::Layer_SkeletonDeformation::get_param(), NoiseDistort::get_param(), Halftone2::get_param(), LinearGradient::get_param(), CurveGradient::get_param(), Halftone3::get_param(), Outline::get_param(), Noise::get_param(), synfig::Layer_Composite::get_param(), Warp::get_param(), synfig::Layer_Polygon::get_param(), Advanced_Outline::get_param(), Mandelbrot::get_param(), Julia::get_param(), synfig::Layer_Shape::get_param(), Circle::get_param(), Plant::get_param(), Layer_Freetype::get_param(), synfig::Layer_PasteCanvas::get_param(), and synfig::Layer::get_param().

#define EXPORT_NAME ( )
Value:
if (param=="Name" || param=="name" || param=="name__") \
return name__; \
else if (param=="local_name__") \
return dgettext("synfig",local_name__);

Exports the name or the local name of the layer.

Referenced by synfig::Layer_Sound::get_param(), synfig::Layer_Duplicate::get_param(), Blur_Layer::get_param(), synfig::Layer_SolidColor::get_param(), LumaKey::get_param(), SuperSample::get_param(), Zoom::get_param(), svg_layer::get_param(), InsideOut::get_param(), Layer_Shade::get_param(), synfig::Layer_Stretch::get_param(), Translate::get_param(), synfig::Layer_Switch::get_param(), CheckerBoard::get_param(), synfig::Layer_MotionBlur::get_param(), Layer_Stroboscope::get_param(), XORPattern::get_param(), synfig::Layer_Clamp::get_param(), synfig::Layer_Skeleton::get_param(), RadialBlur::get_param(), synfig::BooleanCurve::get_param(), SimpleCircle::get_param(), Rectangle::get_param(), Rotate::get_param(), Region::get_param(), Import::get_param(), Twirl::get_param(), synfig::Layer_Group::get_param(), synfig::Layer_ColorCorrect::get_param(), Metaballs::get_param(), synfig::Layer_SphereDistort::get_param(), Star::get_param(), ConicalGradient::get_param(), SpiralGradient::get_param(), Layer_Bevel::get_param(), RadialGradient::get_param(), FilledRect::get_param(), Layer_TimeLoop::get_param(), CurveWarp::get_param(), synfig::Layer_SkeletonDeformation::get_param(), NoiseDistort::get_param(), Halftone2::get_param(), LinearGradient::get_param(), CurveGradient::get_param(), Halftone3::get_param(), Outline::get_param(), Noise::get_param(), synfig::Layer_Polygon::get_param(), Warp::get_param(), Advanced_Outline::get_param(), Mandelbrot::get_param(), Julia::get_param(), synfig::Layer_Shape::get_param(), Circle::get_param(), Plant::get_param(), and Layer_Freetype::get_param().

#define EXPORT_VERSION ( )
Value:
if (param=="Version" || param=="version" || param=="version__") \
return version__;

Exports the version of the layer.

Referenced by synfig::Layer_Sound::get_param(), synfig::Layer_Duplicate::get_param(), Blur_Layer::get_param(), synfig::Layer_SolidColor::get_param(), LumaKey::get_param(), SuperSample::get_param(), Zoom::get_param(), svg_layer::get_param(), InsideOut::get_param(), Layer_Shade::get_param(), synfig::Layer_Stretch::get_param(), Translate::get_param(), synfig::Layer_Switch::get_param(), CheckerBoard::get_param(), synfig::Layer_MotionBlur::get_param(), synfig::Layer_Skeleton::get_param(), Layer_Stroboscope::get_param(), XORPattern::get_param(), synfig::Layer_Clamp::get_param(), RadialBlur::get_param(), synfig::BooleanCurve::get_param(), SimpleCircle::get_param(), Rectangle::get_param(), Rotate::get_param(), Region::get_param(), Import::get_param(), synfig::Layer_Group::get_param(), Twirl::get_param(), synfig::Layer_ColorCorrect::get_param(), Metaballs::get_param(), synfig::Layer_SphereDistort::get_param(), Star::get_param(), ConicalGradient::get_param(), SpiralGradient::get_param(), Layer_Bevel::get_param(), FilledRect::get_param(), RadialGradient::get_param(), Layer_TimeLoop::get_param(), CurveWarp::get_param(), NoiseDistort::get_param(), synfig::Layer_SkeletonDeformation::get_param(), Halftone2::get_param(), LinearGradient::get_param(), CurveGradient::get_param(), Halftone3::get_param(), Outline::get_param(), Noise::get_param(), Warp::get_param(), synfig::Layer_Polygon::get_param(), Advanced_Outline::get_param(), Mandelbrot::get_param(), Julia::get_param(), synfig::Layer_Shape::get_param(), Circle::get_param(), and Layer_Freetype::get_param().

#define CATEGORY_DO_NOT_USE   "Do Not Use"

This is used as the category for layer book entries which represent aliases of layers. It prevents these layers showing up in the menu.

Referenced by OptionsProcessor::process_info_options().

#define SET_INTERPOLATION_DEFAULTS ( )
Value:
{ \
Vocab vocab(get_param_vocab()); \
Vocab::const_iterator viter; \
for(viter=vocab.begin();viter!=vocab.end();viter++) \
{ \
ValueBase v=get_param(viter->get_name()); \
v.set_interpolation(viter->get_interpolation()); \
set_param(viter->get_name(), v); \
} \
} \

Sets the interpolation defaults for the layer.

Referenced by Advanced_Outline::Advanced_Outline(), Blur_Layer::Blur_Layer(), CheckerBoard::CheckerBoard(), Circle::Circle(), ConicalGradient::ConicalGradient(), CurveGradient::CurveGradient(), CurveWarp::CurveWarp(), FilledRect::FilledRect(), Halftone2::Halftone2(), Halftone3::Halftone3(), Import::Import(), InsideOut::InsideOut(), Julia::Julia(), synfig::Layer::Layer(), Layer_Bevel::Layer_Bevel(), synfig::Layer_Bitmap::Layer_Bitmap(), synfig::Layer_Clamp::Layer_Clamp(), synfig::Layer_ColorCorrect::Layer_ColorCorrect(), synfig::Layer_Composite::Layer_Composite(), synfig::Layer_Duplicate::Layer_Duplicate(), Layer_Freetype::Layer_Freetype(), synfig::Layer_Group::Layer_Group(), synfig::Layer_MeshTransform::Layer_MeshTransform(), synfig::Layer_PasteCanvas::Layer_PasteCanvas(), synfig::Layer_Polygon::Layer_Polygon(), Layer_Shade::Layer_Shade(), synfig::Layer_Skeleton::Layer_Skeleton(), synfig::Layer_SkeletonDeformation::Layer_SkeletonDeformation(), synfig::Layer_SolidColor::Layer_SolidColor(), synfig::Layer_Sound::Layer_Sound(), synfig::Layer_SphereDistort::Layer_SphereDistort(), synfig::Layer_Stretch::Layer_Stretch(), Layer_Stroboscope::Layer_Stroboscope(), synfig::Layer_Switch::Layer_Switch(), Layer_TimeLoop::Layer_TimeLoop(), LinearGradient::LinearGradient(), Mandelbrot::Mandelbrot(), Metaballs::Metaballs(), Noise::Noise(), NoiseDistort::NoiseDistort(), Outline::Outline(), Plant::Plant(), RadialBlur::RadialBlur(), RadialGradient::RadialGradient(), Rectangle::Rectangle(), Region::Region(), Rotate::Rotate(), SimpleCircle::SimpleCircle(), SpiralGradient::SpiralGradient(), Star::Star(), SuperSample::SuperSample(), Translate::Translate(), Twirl::Twirl(), Warp::Warp(), XORPattern::XORPattern(), and Zoom::Zoom().

#define SET_STATIC_DEFAULTS ( )
Value:
{ \
Vocab vocab(get_param_vocab()); \
Vocab::const_iterator viter; \
for(viter=vocab.begin();viter!=vocab.end();viter++) \
{ \
ValueBase v=get_param(viter->get_name()); \
v.set_static(viter->get_static()); \
set_param(viter->get_name(), v); \
} \
} \

Sets the static defaults for the layer.

Referenced by Advanced_Outline::Advanced_Outline(), Blur_Layer::Blur_Layer(), CheckerBoard::CheckerBoard(), Circle::Circle(), ConicalGradient::ConicalGradient(), CurveGradient::CurveGradient(), CurveWarp::CurveWarp(), FilledRect::FilledRect(), Halftone2::Halftone2(), Halftone3::Halftone3(), Import::Import(), InsideOut::InsideOut(), Julia::Julia(), synfig::Layer::Layer(), Layer_Bevel::Layer_Bevel(), synfig::Layer_Bitmap::Layer_Bitmap(), synfig::Layer_Clamp::Layer_Clamp(), synfig::Layer_ColorCorrect::Layer_ColorCorrect(), synfig::Layer_Composite::Layer_Composite(), synfig::Layer_Duplicate::Layer_Duplicate(), Layer_Freetype::Layer_Freetype(), synfig::Layer_Group::Layer_Group(), synfig::Layer_MeshTransform::Layer_MeshTransform(), synfig::Layer_PasteCanvas::Layer_PasteCanvas(), synfig::Layer_Polygon::Layer_Polygon(), Layer_Shade::Layer_Shade(), synfig::Layer_Skeleton::Layer_Skeleton(), synfig::Layer_SkeletonDeformation::Layer_SkeletonDeformation(), synfig::Layer_SolidColor::Layer_SolidColor(), synfig::Layer_Sound::Layer_Sound(), synfig::Layer_SphereDistort::Layer_SphereDistort(), synfig::Layer_Stretch::Layer_Stretch(), Layer_Stroboscope::Layer_Stroboscope(), synfig::Layer_Switch::Layer_Switch(), Layer_TimeLoop::Layer_TimeLoop(), LinearGradient::LinearGradient(), Mandelbrot::Mandelbrot(), Metaballs::Metaballs(), Noise::Noise(), NoiseDistort::NoiseDistort(), Outline::Outline(), Plant::Plant(), RadialBlur::RadialBlur(), RadialGradient::RadialGradient(), Rectangle::Rectangle(), Region::Region(), Rotate::Rotate(), SimpleCircle::SimpleCircle(), SpiralGradient::SpiralGradient(), Star::Star(), SuperSample::SuperSample(), Translate::Translate(), Twirl::Twirl(), Warp::Warp(), XORPattern::XORPattern(), and Zoom::Zoom().