-# $Header: /opt/voria/cvs/sinfg/Makefile.am,v 1.5 2005/03/24 21:07:24 darco Exp $
+# $Header: /opt/voria/cvs/synfig/Makefile.am,v 1.5 2005/03/24 21:07:24 darco Exp $
#AUTOMAKE_OPTIONS=dist-zip dist-shar dist-bzip2
AUTOMAKE_OPTIONS=dist-zip dist-shar
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = @PACKAGE_TARNAME@.pc
-bin_SCRIPTS=sinfg-config
+bin_SCRIPTS=synfig-config
-EXTRA_DIST=bootstrap config/depcomp config/sinfg.m4 config/cxx_macros.m4 sinfg.pbproj/config.h sinfg.pbproj/project.pbxproj @PACKAGE_TARNAME@-@VERSION@.spec config/project.spec.in config/build.cfg sinfg.kdevprj sinfg-config.in config/ETL.m4 config/doxygen.cfg.in doxygen.cfg config/pkgconfig.pc.in config/pkgconfig.m4 config/libxml++.m4 @PACKAGE_TARNAME@.pc.in
+EXTRA_DIST=bootstrap config/depcomp config/synfig.m4 config/cxx_macros.m4 synfig.pbproj/config.h synfig.pbproj/project.pbxproj @PACKAGE_TARNAME@-@VERSION@.spec config/project.spec.in config/build.cfg synfig.kdevprj synfig-config.in config/ETL.m4 config/doxygen.cfg.in doxygen.cfg config/pkgconfig.pc.in config/pkgconfig.m4 config/libxml++.m4 @PACKAGE_TARNAME@.pc.in
CVS=cvs
-@echo
install-bin:
- make -C src/sinfg install-libLTLIBRARIES
+ make -C src/synfig install-libLTLIBRARIES
win32inst.nsi: $(srcdir)/win32inst.nsi.in
./config.status win32inst.nsi
touch .doc_stamp
benchmark:
- sinfg -b -t null -q --time 0 $(srcdir)/examples/*.sif
+ synfig -b -t null -q --time 0 $(srcdir)/examples/*.sif
html: .doc_stamp
-i# $Header: /opt/voria/cvs/sinfg/config/configure.ac,v 1.10 2005/03/24 21:07:24 darco Exp $
+i# $Header: /opt/voria/cvs/synfig/config/configure.ac,v 1.10 2005/03/24 21:07:24 darco Exp $
# -- I N I T --------------------------------------------------
use_layerprofiling="no"
])
if test $use_layerprofiling = "yes" ; then {
- AC_DEFINE(SINFG_PROFILE_LAYERS,[1],[enable layer profiling])
+ AC_DEFINE(SYNFIG_PROFILE_LAYERS,[1],[enable layer profiling])
} ; fi
-MODULE_DIR='${libdir}/sinfg/modules'
-moduledir=$libdir/sinfg/modules
+MODULE_DIR='${libdir}/synfig/modules'
+moduledir=$libdir/synfig/modules
AC_SUBST(MODULE_DIR)
-SINFGLIB_DIR=$libdir/sinfg
-AC_SUBST(SINFGLIB_DIR)
+SYNFIGLIB_DIR=$libdir/synfig
+AC_SUBST(SYNFIGLIB_DIR)
dnl AC_CONFIG_SUBDIRS(libltdl)
-CONFIG_LIBS="-lsinfg"
+CONFIG_LIBS="-lsynfig"
CONFIG_CFLAGS="$CONFIG_CFLAGS"
AC_SUBST(CONFIG_LIBS)
AC_SUBST(CONFIG_CFLAGS)
AC_SUBST(CONFIG_DEPS)
AC_SUBST(ETL_CFLAGS)
-SINFG_LIBS="$VIMAGE_LIBS $LIBXMLPP_LIBS $ETL_LIBS $OPENEXR_LIBS $LIBSIGC_LIBS"
-SINFG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $OPENEXR_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSINFG_NO_DEPRECATED"
+SYNFIG_LIBS="$VIMAGE_LIBS $LIBXMLPP_LIBS $ETL_LIBS $OPENEXR_LIBS $LIBSIGC_LIBS"
+SYNFIG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $OPENEXR_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSYNFIG_NO_DEPRECATED"
CONFIG_CFLAGS="`echo $CONFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
-SINFG_CFLAGS="`echo $SINFG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
-SINFG_LIBS="`echo $SINFG_LIBS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
+SYNFIG_CFLAGS="`echo $SYNFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
+SYNFIG_LIBS="`echo $SYNFIG_LIBS | sed s/-mno-cygwin//g | sed s/-mwindows//g`"
AC_SUBST(LIBADD_DL)
-AC_SUBST(SINFG_LIBS)
-AC_SUBST(SINFG_CFLAGS)
+AC_SUBST(SYNFIG_LIBS)
+AC_SUBST(SYNFIG_CFLAGS)
AC_SUBST(API_VERSION)
-sinfgincludedir=$includedir/sinfg-@API_VERSION@
-AC_SUBST(sinfgincludedir)
+synfigincludedir=$includedir/synfig-@API_VERSION@
+AC_SUBST(synfigincludedir)
[(
[ -d libltdl ] || mkdir libltdl;
)]
AC_OUTPUT(
-sinfg-config
+synfig-config
@PACKAGE_TARNAME@.pc
Makefile
src/Makefile
-src/sinfg/Makefile
+src/synfig/Makefile
src/modules/Makefile
src/modules/example/Makefile
src/modules/mod_filter/Makefile
src/modules/mod_yuv420p/Makefile
src/modules/mod_particle/Makefile
src/tool/Makefile
-src/modules/sinfg_modules.cfg
+src/modules/synfig_modules.cfg
win32inst.nsi
pkg-info/macosx/synfig-core.info
dnl src/modules/trgt_mpg/Makefile
"'$'"CXX ------------------------------> '$CXX'
"'$'"CXXFLAGS -------------------------> '$CXXFLAGS'
-"'$'"SINFG_LIBS -----------------------> '$SINFG_LIBS'
+"'$'"SYNFIG_LIBS -----------------------> '$SYNFIG_LIBS'
"'$'"LIBXMLPP_LIBS --------------------> '$LIBXMLPP_LIBS'
"'$'"ETL_LIBS -------------------------> '$ETL_LIBS'
"'$'"LIBSIGC_LIBS ---------------------> '$LIBSIGC_LIBS'
-"'$'"SINFG_CFLAGS ---------------------> '$SINFG_CFLAGS'
+"'$'"SYNFIG_CFLAGS ---------------------> '$SYNFIG_CFLAGS'
"'$'"LIBADD_DL ------------------------> '$LIBADD_DL'
"
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = src/sinfg
+INPUT = src/synfig
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed.
-PREDEFINED = SINFG_NO_DEPRECATED DOXYGEN_SKIP
+PREDEFINED = SYNFIG_NO_DEPRECATED DOXYGEN_SKIP
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir=@sinfgincludedir@
+includedir=@synfigincludedir@
Name: @PACKAGE_TARNAME@
Description: @PACKAGE_NAME@
Requires: @CONFIG_DEPS@
Version: @VERSION@
Libs: -L${libdir} @CONFIG_LIBS@
-Cflags: @CONFIG_CFLAGS@ -I@sinfgincludedir@
+Cflags: @CONFIG_CFLAGS@ -I@synfigincludedir@
-# $Header: /opt/voria/cvs/sinfg/src/Makefile.am,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/Makefile.am,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
-SUBDIRS=sinfg modules tool
+SUBDIRS=synfig modules tool
EXTRA_DIST=template.cpp template.h
-# $Header: /opt/voria/cvs/sinfg/src/modules/Makefile.am,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/Makefile.am,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $
-sinfglibdir=@SINFGLIB_DIR@
+synfiglibdir=@SYNFIGLIB_DIR@
MAINTAINERCLEANFILES=Makefile.in
SUBDIRS=mod_particle mod_filter mod_yuv420p mod_gif mod_gradient mod_geometry mod_noise mod_libavcodec mod_jpeg mod_openexr mod_bmp mod_ppm mod_png mod_dv mod_imagemagick mod_ffmpeg lyr_freetype lyr_std
-sysconf_DATA = sinfg_modules.cfg
+sysconf_DATA = synfig_modules.cfg
-# $Header: /opt/voria/cvs/sinfg/src/modules/example/Makefile.am,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/example/Makefile.am,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libexample.la
libexample_la_SOURCES = main.cpp simplecircle.cpp simplecircle.h filledrect.h filledrect.cpp metaballs.h metaballs.cpp
-libexample_la_LIBADD = ../../sinfg/libsinfg.la @SINFG_LIBS@
+libexample_la_LIBADD = ../../synfig/libsynfig.la @SYNFIG_LIBS@
libexample_la_LDFLAGS = -module -no-undefined
-libexample_la_CXXFLAGS = @SINFG_CFLAGS@
+libexample_la_CXXFLAGS = @SYNFIG_CFLAGS@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file filledrect.cpp
** \brief Template Header
**
# include <config.h>
#endif
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include <ETL/pen>
#include "filledrect.h"
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(FilledRect);
-SINFG_LAYER_SET_NAME(FilledRect,"rectangle");
-SINFG_LAYER_SET_LOCAL_NAME(FilledRect,_("Rectangle"));
-SINFG_LAYER_SET_CATEGORY(FilledRect,_("Geometry"));
-SINFG_LAYER_SET_VERSION(FilledRect,"0.1");
-SINFG_LAYER_SET_CVS_ID(FilledRect,"$Id: filledrect.cpp,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $");
+SYNFIG_LAYER_INIT(FilledRect);
+SYNFIG_LAYER_SET_NAME(FilledRect,"rectangle");
+SYNFIG_LAYER_SET_LOCAL_NAME(FilledRect,_("Rectangle"));
+SYNFIG_LAYER_SET_CATEGORY(FilledRect,_("Geometry"));
+SYNFIG_LAYER_SET_VERSION(FilledRect,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(FilledRect,"$Id: filledrect.cpp,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $");
/* === P R O C E D U R E S ================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file filledrect.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_FILLEDRECT_H
-#define __SINFG_FILLEDRECT_H
+#ifndef __SYNFIG_FILLEDRECT_H
+#define __SYNFIG_FILLEDRECT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/value.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/value.h>
#include <list>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class FilledRect : public sinfg::Layer_Composite
+class FilledRect : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Color color;
+ synfig::Color color;
- sinfg::Point point1;
- sinfg::Point point2;
+ synfig::Point point1;
+ synfig::Point point2;
- sinfg::Real feather_x;
- sinfg::Real feather_y;
+ synfig::Real feather_x;
+ synfig::Real feather_y;
- sinfg::Real bevel;
+ synfig::Real bevel;
bool bevCircle;
- bool get_color(const sinfg::Point &pos, sinfg::Color &out, sinfg::Real &outamount)const;
+ bool get_color(const synfig::Point &pos, synfig::Color &out, synfig::Real &outamount)const;
public:
FilledRect();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
virtual Vocab get_param_vocab()const;
}; // END of class FilledRect
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
-#include <sinfg/canvas.h>
-#include <sinfg/string.h>
+#include <synfig/module.h>
+#include <synfig/canvas.h>
+#include <synfig/string.h>
#include "simplecircle.h"
#include "filledrect.h"
#include "metaballs.h"
MODULE_DESCRIPTION("A dummy module that serves as a starting point for writing other modules.")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(example)
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file metaballs.cpp
** \brief Implements metaballs
**
# include <config.h>
#endif
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include <ETL/pen>
#include "metaballs.h"
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Metaballs);
-SINFG_LAYER_SET_NAME(Metaballs,"metaballs");
-SINFG_LAYER_SET_LOCAL_NAME(Metaballs,_("Metaballs"));
-SINFG_LAYER_SET_CATEGORY(Metaballs,_("Default"));
-SINFG_LAYER_SET_VERSION(Metaballs,"0.1");
-SINFG_LAYER_SET_CVS_ID(Metaballs,"$Id: metaballs.cpp,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $");
+SYNFIG_LAYER_INIT(Metaballs);
+SYNFIG_LAYER_SET_NAME(Metaballs,"metaballs");
+SYNFIG_LAYER_SET_LOCAL_NAME(Metaballs,_("Metaballs"));
+SYNFIG_LAYER_SET_CATEGORY(Metaballs,_("Default"));
+SYNFIG_LAYER_SET_VERSION(Metaballs,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Metaballs,"$Id: metaballs.cpp,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $");
/* === P R O C E D U R E S ================================================= */
return ret;
}
-static inline Real densityfunc(const sinfg::Point &p, const sinfg::Point &c, Real R)
+static inline Real densityfunc(const synfig::Point &p, const synfig::Point &c, Real R)
{
const Real dx = p[0] - c[0];
const Real dy = p[1] - c[1];
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file metaballs.h
** \brief Declares information for defining Metaballs.
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_METABALLS_H
-#define __SINFG_METABALLS_H
+#ifndef __SYNFIG_METABALLS_H
+#define __SYNFIG_METABALLS_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/value.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/value.h>
#include <vector>
/* === M A C R O S ========================================================= */
/* === T Y P E D E F S ===================================================== */
/* === C L A S S E S & S T R U C T S ======================================= */
-class Metaballs : public sinfg::Layer_Composite
+class Metaballs : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Color color;
+ synfig::Color color;
- std::vector<sinfg::Point> centers;
- std::vector<sinfg::Real> radii;
- std::vector<sinfg::Real> weights;
+ std::vector<synfig::Point> centers;
+ std::vector<synfig::Real> radii;
+ std::vector<synfig::Real> weights;
- sinfg::Real threshold;
+ synfig::Real threshold;
//Real threshold2;
- sinfg::Real totaldensity(const sinfg::Point &pos)const;
+ synfig::Real totaldensity(const synfig::Point &pos)const;
public:
Metaballs();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
virtual Vocab get_param_vocab()const;
}; // END of class Metaballs
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_solidcolor.cpp
** \brief Template Header
**
# include <config.h>
#endif
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include "simplecircle.h"
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(SimpleCircle);
-SINFG_LAYER_SET_NAME(SimpleCircle,"simple_circle");
-SINFG_LAYER_SET_LOCAL_NAME(SimpleCircle,_("Simple Circle"));
-SINFG_LAYER_SET_CATEGORY(SimpleCircle,_("Do Not Use"));
-SINFG_LAYER_SET_VERSION(SimpleCircle,"0.1");
-SINFG_LAYER_SET_CVS_ID(SimpleCircle,"$Id: simplecircle.cpp,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $");
+SYNFIG_LAYER_INIT(SimpleCircle);
+SYNFIG_LAYER_SET_NAME(SimpleCircle,"simple_circle");
+SYNFIG_LAYER_SET_LOCAL_NAME(SimpleCircle,_("Simple Circle"));
+SYNFIG_LAYER_SET_CATEGORY(SimpleCircle,_("Do Not Use"));
+SYNFIG_LAYER_SET_VERSION(SimpleCircle,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(SimpleCircle,"$Id: simplecircle.cpp,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $");
/* === P R O C E D U R E S ================================================= */
return context.get_color(pos);
}
-sinfg::Layer::Handle
-SimpleCircle::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+SimpleCircle::hit_check(synfig::Context context, const synfig::Point &pos)const
{
if((pos-center).mag()<radius)
return const_cast<SimpleCircle*>(this);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file simplecircle.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_SIMPLECIRCLE_H
-#define __SINFG_SIMPLECIRCLE_H
+#ifndef __SYNFIG_SIMPLECIRCLE_H
+#define __SYNFIG_SIMPLECIRCLE_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/layer_composite.h>
-#include <sinfg/value.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/layer_composite.h>
+#include <synfig/value.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class SimpleCircle : public sinfg::Layer_Composite
+class SimpleCircle : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Color color;
+ synfig::Color color;
- sinfg::Point center;
+ synfig::Point center;
- sinfg::Real radius;
+ synfig::Real radius;
public:
SimpleCircle();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
- //virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
+ //virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
}; // END of class SimpleCircle
-# $Header: /opt/voria/cvs/sinfg/src/modules/lyr_freetype/Makefile.am,v 1.3 2005/03/24 21:07:24 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/lyr_freetype/Makefile.am,v 1.3 2005/03/24 21:07:24 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
INCLUDES = -I$(top_srcdir)/src
if WITH_FREETYPE
module_LTLIBRARIES = liblyr_freetype.la
liblyr_freetype_la_SOURCES = main.cpp lyr_freetype.cpp lyr_freetype.h
-liblyr_freetype_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+liblyr_freetype_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
liblyr_freetype_la_LDFLAGS = -module @FREETYPE_LIBS@ -no-undefined
-liblyr_freetype_la_CXXFLAGS = @SINFG_CFLAGS@ @FREETYPE_CFLAGS@
+liblyr_freetype_la_CXXFLAGS = @SYNFIG_CFLAGS@ @FREETYPE_CFLAGS@
else
endif
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: lyr_freetype.cpp,v 1.5 2005/01/24 05:00:18 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_LAYER
+#define SYNFIG_LAYER
#ifdef USING_PCH
# include "pch.h"
#include "lyr_freetype.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/canvas.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/canvas.h>
#include <ETL/misc>
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(lyr_freetype);
-SINFG_LAYER_SET_NAME(lyr_freetype,"text");
-SINFG_LAYER_SET_LOCAL_NAME(lyr_freetype,_("Simple Text"));
-SINFG_LAYER_SET_CATEGORY(lyr_freetype,_("Typography"));
-SINFG_LAYER_SET_VERSION(lyr_freetype,"0.2");
-SINFG_LAYER_SET_CVS_ID(lyr_freetype,"$Id: lyr_freetype.cpp,v 1.5 2005/01/24 05:00:18 darco Exp $");
+SYNFIG_LAYER_INIT(lyr_freetype);
+SYNFIG_LAYER_SET_NAME(lyr_freetype,"text");
+SYNFIG_LAYER_SET_LOCAL_NAME(lyr_freetype,_("Simple Text"));
+SYNFIG_LAYER_SET_CATEGORY(lyr_freetype,_("Typography"));
+SYNFIG_LAYER_SET_VERSION(lyr_freetype,"0.2");
+SYNFIG_LAYER_SET_CVS_ID(lyr_freetype,"$Id: lyr_freetype.cpp,v 1.5 2005/01/24 05:00:18 darco Exp $");
/* === P R O C E D U R E S ================================================= */
}
void
-lyr_freetype::new_font(const sinfg::String &family, int style, int weight)
+lyr_freetype::new_font(const synfig::String &family, int style, int weight)
{
if(
!new_font_(family,style,weight) &&
}
bool
-lyr_freetype::new_font_(const sinfg::String &family_, int style, int weight)
+lyr_freetype::new_font_(const synfig::String &family_, int style, int weight)
{
- sinfg::String family(family_);
+ synfig::String family(family_);
//start evil hack
for(int i=0;i<family.size();i++)family[i]=tolower(family[i]);
#endif
if(error)
{
- //sinfg::error(strprintf("lyr_freetype:%s (err=%d)",_("Unable to open face."),error));
+ //synfig::error(strprintf("lyr_freetype:%s (err=%d)",_("Unable to open face."),error));
return false;
}
bool
lyr_freetype::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const
{
- static sinfg::RecMutex freetype_mutex;
+ static synfig::RecMutex freetype_mutex;
if(needs_sync_)
const_cast<lyr_freetype*>(this)->sync();
return true;
}
- sinfg::RecMutex::Lock lock(freetype_mutex);
+ synfig::RecMutex::Lock lock(freetype_mutex);
#define CHAR_RESOLUTION (64)
error = FT_Set_Char_Size(
// error in freetype's rendering engine.
const float xerror(abs(size[0]*pw)/(float)face->size->metrics.x_ppem/1.13f/0.996);
const float yerror(abs(size[1]*ph)/(float)face->size->metrics.y_ppem/1.13f/0.996);
- //sinfg::info("xerror=%f, yerror=%f",xerror,yerror);
+ //synfig::info("xerror=%f, yerror=%f",xerror,yerror);
const float compress(lyr_freetype::compress*xerror);
const float vcompress(lyr_freetype::vcompress*yerror);
int string_height;
string_height=round_to_int(((lines.size()-1)*line_height+lines.back().actual_height()));
- //sinfg::info("string_height=%d",string_height);
- //sinfg::info("line_height=%f",line_height);
+ //synfig::info("string_height=%d",string_height);
+ //synfig::info("line_height=%f",line_height);
/*
-- ** -- RENDER THE GLYPHS ---------------------------------------------------
bx=round_to_int((pos[0]-renddesc.get_tl()[0])*pw*CHAR_RESOLUTION-orient[0]*iter->width);
by=round_to_int((pos[1]-renddesc.get_tl()[1])*ph*CHAR_RESOLUTION+(1.0-orient[1])*string_height-line_height*curr_line);
//by=round_to_int(vcompress*((pos[1]-renddesc.get_tl()[1])*ph*64+(1.0-orient[1])*string_height-face->size->metrics.height*curr_line));
- //sinfg::info("curr_line=%d, bx=%d, by=%d",curr_line,bx,by);
+ //synfig::info("curr_line=%d, bx=%d, by=%d",curr_line,bx,by);
std::vector<Glyph>::iterator iter2;
for(iter2=iter->glyph_table.begin();iter2!=iter->glyph_table.end();++iter2)
pen.x = bx + iter2->pos.x;
pen.y = by + iter2->pos.y;
- //sinfg::info("GLYPH: pen.x=%d, pen,y=%d",curr_line,(pen.x+32)>>6,(pen.y+32)>>6);
+ //synfig::info("GLYPH: pen.x=%d, pen,y=%d",curr_line,(pen.x+32)>>6,(pen.y+32)>>6);
error = FT_Glyph_To_Bitmap( &image, ft_render_mode_normal,0/*&pen*/, 1 );
if(error) { FT_Done_Glyph( image ); continue; }
return true;
}
-sinfg::Rect
+synfig::Rect
lyr_freetype::get_bounding_rect()const
{
if(needs_sync_)
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: lyr_freetype.h,v 1.3 2005/01/24 03:08:17 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LYR_FREETYPE_H
-#define __SINFG_LYR_FREETYPE_H
+#ifndef __SYNFIG_LYR_FREETYPE_H
+#define __SYNFIG_LYR_FREETYPE_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/vector.h>
-#include <sinfg/color.h>
-#include <sinfg/string.h>
+#include <synfig/layer_composite.h>
+#include <synfig/vector.h>
+#include <synfig/color.h>
+#include <synfig/string.h>
#include <ft2build.h>
#include FT_FREETYPE_H
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
};
-class lyr_freetype : public sinfg::Layer_Composite, public sinfg::Layer_NoDeform
+class lyr_freetype : public synfig::Layer_Composite, public synfig::Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
FT_Face face;
- sinfg::String font;
- sinfg::String family;
- sinfg::String text;
- sinfg::Vector size;
- sinfg::Vector orient;
- sinfg::Color color;
- sinfg::Point pos;
- sinfg::Real compress;
- sinfg::Real vcompress;
+ synfig::String font;
+ synfig::String family;
+ synfig::String text;
+ synfig::Vector size;
+ synfig::Vector orient;
+ synfig::Color color;
+ synfig::Point pos;
+ synfig::Real compress;
+ synfig::Real vcompress;
int style;
int weight;
void sync();
- mutable sinfg::Mutex mutex;
+ mutable synfig::Mutex mutex;
public:
lyr_freetype();
virtual ~lyr_freetype();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
virtual bool set_version(const String &ver){if(ver=="0.1")old_version=true;return true;}
virtual void reset_version(){old_version=false;}
- virtual sinfg::Rect get_bounding_rect()const;
+ virtual synfig::Rect get_bounding_rect()const;
private:
- void new_font(const sinfg::String &family, int style=0, int weight=400);
- bool new_font_(const sinfg::String &family, int style=0, int weight=400);
- bool new_face(const sinfg::String &newfont);
+ void new_font(const synfig::String &family, int style=0, int weight=400);
+ bool new_font_(const synfig::String &family, int style=0, int weight=400);
+ bool new_face(const synfig::String &newfont);
};
extern FT_Library ft_library;
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
#endif
#include <string.h>
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "lyr_freetype.h"
#include <iostream>
#include <ETL/stringf>
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
FT_Library ft_library;
/* === E N T R Y P O I N T ================================================= */
-bool freetype_constructor(sinfg::ProgressCallback *cb)
+bool freetype_constructor(synfig::ProgressCallback *cb)
{
int error;
if(cb)cb->task("Initializing FreeType...");
MODULE_DESCRIPTION("Provides a font rendering layer via FreeType")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_CONSTRUCTOR(freetype_constructor)
MODULE_DESTRUCTOR(freetype_destructor)
-# $Header: /opt/voria/cvs/sinfg/src/modules/lyr_std/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/lyr_std/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = liblyr_std.la
liblyr_std_la_SOURCES = main.cpp timeloop.cpp timeloop.h warp.cpp warp.h xorpattern.cpp booleancurve.h booleancurve.cpp bevel.cpp bevel.h shade.cpp shade.h twirl.cpp twirl.h stretch.cpp stretch.h xorpattern.h clamp.cpp clamp.h supersample.cpp supersample.h insideout.cpp insideout.h julia.cpp julia.h rotate.cpp rotate.h mandelbrot.cpp mandelbrot.h zoom.h zoom.cpp import.cpp import.h translate.h translate.cpp sphere_distort.h sphere_distort.cpp
-liblyr_std_la_CXXFLAGS = @SINFG_CFLAGS@
-liblyr_std_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+liblyr_std_la_CXXFLAGS = @SYNFIG_CFLAGS@
+liblyr_std_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
liblyr_std_la_LDFLAGS = -module -no-undefined
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file shade.cpp
** \brief Template Header
**
#include "bevel.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/segment.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/segment.h>
#include <cstring>
#include <ETL/pen>
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace etl;
using namespace std;
/* -- G L O B A L S --------------------------------------------------------- */
-SINFG_LAYER_INIT(Layer_Bevel);
-SINFG_LAYER_SET_NAME(Layer_Bevel,"bevel");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_Bevel,_("Bevel"));
-SINFG_LAYER_SET_CATEGORY(Layer_Bevel,_("Stylize"));
-SINFG_LAYER_SET_VERSION(Layer_Bevel,"0.2");
-SINFG_LAYER_SET_CVS_ID(Layer_Bevel,"$Id: bevel.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_Bevel);
+SYNFIG_LAYER_SET_NAME(Layer_Bevel,"bevel");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Bevel,_("Bevel"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_Bevel,_("Stylize"));
+SYNFIG_LAYER_SET_VERSION(Layer_Bevel,"0.2");
+SYNFIG_LAYER_SET_CVS_ID(Layer_Bevel,"$Id: bevel.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
/* -- F U N C T I O N S ----------------------------------------------------- */
-inline void clamp(sinfg::Vector &v)
+inline void clamp(synfig::Vector &v)
{
if(v[0]<0.0)v[0]=0.0;
if(v[1]<0.0)v[1]=0.0;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file shade.h
** \brief Template Header
**
/* === H E A D E R S ======================================================= */
-#ifndef __SINFG_LAYER_BEVEL_H__
-#define __SINFG_LAYER_BEVEL_H__
+#ifndef __SYNFIG_LAYER_BEVEL_H__
+#define __SYNFIG_LAYER_BEVEL_H__
/* -- H E A D E R S --------------------------------------------------------- */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/blur.h>
-#include <sinfg/angle.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/blur.h>
+#include <synfig/angle.h>
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
-class Layer_Bevel : public sinfg::Layer_Composite
+class Layer_Bevel : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Real softness;
+ synfig::Real softness;
int type;
- sinfg::Color color1;
- sinfg::Color color2;
+ synfig::Color color1;
+ synfig::Color color2;
- sinfg::Angle angle;
- sinfg::Real depth;
+ synfig::Angle angle;
+ synfig::Real depth;
- sinfg::Vector offset;
- sinfg::Vector offset45;
+ synfig::Vector offset;
+ synfig::Vector offset45;
bool use_luma;
bool solid;
public:
Layer_Bevel();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- virtual sinfg::Rect get_full_bounding_rect(Context context)const;
+ virtual synfig::Rect get_full_bounding_rect(Context context)const;
virtual Vocab get_param_vocab()const;
}; // END of class Blur
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file boolean_curve.cpp
** \brief Boolean Curve Implementation File
**
#include "booleancurve.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
{
}
-bool BooleanCurve::set_param(const String & param, const sinfg::ValueBase &value)
+bool BooleanCurve::set_param(const String & param, const synfig::ValueBase &value)
{
if(param=="regions" && value.same_as(regions))
{
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file boolean_curve.h
** \brief Boolean Curve Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_BOOLEAN_CURVE_H
-#define __SINFG_BOOLEAN_CURVE_H
+#ifndef __SYNFIG_BOOLEAN_CURVE_H
+#define __SYNFIG_BOOLEAN_CURVE_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_shape.h>
-#include <sinfg/blinepoint.h>
+#include <synfig/layer_shape.h>
+#include <synfig/blinepoint.h>
#include <vector>
/* === T Y P E D E F S ===================================================== */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg
+namespace synfig
{
class BooleanCurve : public Layer_Shape
BooleanCurve();
~BooleanCurve();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Vocab get_param_vocab()const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
};
-} //end of namespace sinfg
+} //end of namespace synfig
/* === E N D =============================================================== */
#endif
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file clamp.cpp
** \brief Template Header
**
#endif
#include "clamp.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_Clamp);
-SINFG_LAYER_SET_NAME(Layer_Clamp,"clamp");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_Clamp,_("Clamp"));
-SINFG_LAYER_SET_CATEGORY(Layer_Clamp,_("Filters"));
-SINFG_LAYER_SET_VERSION(Layer_Clamp,"0.2");
-SINFG_LAYER_SET_CVS_ID(Layer_Clamp,"$Id: clamp.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_Clamp);
+SYNFIG_LAYER_SET_NAME(Layer_Clamp,"clamp");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Clamp,_("Clamp"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_Clamp,_("Filters"));
+SYNFIG_LAYER_SET_VERSION(Layer_Clamp,"0.2");
+SYNFIG_LAYER_SET_CVS_ID(Layer_Clamp,"$Id: clamp.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $");
/* === P R O C E D U R E S ================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file clamp.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_SOLIDCOLOR_H
-#define __SINFG_LAYER_SOLIDCOLOR_H
+#ifndef __SYNFIG_LAYER_SOLIDCOLOR_H
+#define __SYNFIG_LAYER_SOLIDCOLOR_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
+#include <synfig/layer.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Layer_Clamp : public Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
Layer_Clamp();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Vocab get_param_vocab()const;
}; // END of class Layer_Clamp
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** Image Import Layer Implementation
** $Id: import.cpp,v 1.2 2005/03/19 04:26:42 darco Exp $
**
#endif
#include "import.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/canvas.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/canvas.h>
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Import);
-SINFG_LAYER_SET_NAME(Import,"import");
-SINFG_LAYER_SET_LOCAL_NAME(Import,_("Import"));
-SINFG_LAYER_SET_CATEGORY(Import,_("Other"));
-SINFG_LAYER_SET_VERSION(Import,"0.1");
-SINFG_LAYER_SET_CVS_ID(Import,"$Id: import.cpp,v 1.2 2005/03/19 04:26:42 darco Exp $");
+SYNFIG_LAYER_INIT(Import);
+SYNFIG_LAYER_SET_NAME(Import,"import");
+SYNFIG_LAYER_SET_LOCAL_NAME(Import,_("Import"));
+SYNFIG_LAYER_SET_CATEGORY(Import,_("Other"));
+SYNFIG_LAYER_SET_VERSION(Import,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Import,"$Id: import.cpp,v 1.2 2005/03/19 04:26:42 darco Exp $");
/* === P R O C E D U R E S ================================================= */
//if(get_canvas()->get_file_path()==dirname(newfilename))
//{
- // sinfg::info("Image seems to be in local directory. Adjusting path...");
+ // synfig::info("Image seems to be in local directory. Adjusting path...");
// newfilename=basename(newfilename);
//}
while(basename(curpath)==".")curpath=dirname(curpath);
newfilename=relative_path(curpath,newfilename);
- sinfg::info("basename(curpath)=%s, Path adjusted to %s",basename(curpath).c_str(),newfilename.c_str());
+ synfig::info("basename(curpath)=%s, Path adjusted to %s",basename(curpath).c_str(),newfilename.c_str());
}
#endif
// If we are already loaded, don't reload
if(filename==newfilename && importer)
{
- sinfg::warning(strprintf(_("Filename seems to already be set to \"%s\" (%s)"),filename.c_str(),newfilename.c_str()));
+ synfig::warning(strprintf(_("Filename seems to already be set to \"%s\" (%s)"),filename.c_str(),newfilename.c_str()));
return true;
}
newimporter=Importer::open(get_canvas()->get_file_path()+ETL_DIRECTORY_SEPERATOR+basename(newfilename));
if(!newimporter)
{
- sinfg::error(strprintf("Unable to create an importer object with file \"%s\"",filename_with_path.c_str()));
+ synfig::error(strprintf("Unable to create an importer object with file \"%s\"",filename_with_path.c_str()));
surface.clear();
return false;
}
surface.clear();
if(!newimporter->get_frame(surface,Time(0)))
{
- sinfg::warning(strprintf("Unable to get frame from \"%s\"",filename_with_path.c_str()));
+ synfig::warning(strprintf("Unable to get frame from \"%s\"",filename_with_path.c_str()));
}
importer=newimporter;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file import.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_IMPORT_H
-#define __SINFG_IMPORT_H
+#ifndef __SYNFIG_IMPORT_H
+#define __SYNFIG_IMPORT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_bitmap.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/importer.h>
+#include <synfig/layer_bitmap.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/importer.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class Import : public sinfg::Layer_Bitmap
+class Import : public synfig::Layer_Bitmap
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::String filename;
- sinfg::String abs_filename;
- sinfg::Importer::Handle importer;
- sinfg::Time time_offset;
+ synfig::String filename;
+ synfig::String abs_filename;
+ synfig::Importer::Handle importer;
+ synfig::Time time_offset;
protected:
Import();
public:
~Import();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
virtual Vocab get_param_vocab()const;
virtual void on_canvas_set();
- virtual void set_time(sinfg::Context context, sinfg::Time time)const;
+ virtual void set_time(synfig::Context context, synfig::Time time)const;
- virtual void set_time(sinfg::Context context, sinfg::Time time, const sinfg::Point &pos)const;
+ virtual void set_time(synfig::Context context, synfig::Time time, const synfig::Point &pos)const;
};
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: insideout.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
#include "insideout.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/transform.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/transform.h>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(InsideOut);
-SINFG_LAYER_SET_NAME(InsideOut,"inside_out");
-SINFG_LAYER_SET_LOCAL_NAME(InsideOut,_("InsideOut"));
-SINFG_LAYER_SET_CATEGORY(InsideOut,_("Distortions"));
-SINFG_LAYER_SET_VERSION(InsideOut,"0.1");
-SINFG_LAYER_SET_CVS_ID(InsideOut,"$Id: insideout.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(InsideOut);
+SYNFIG_LAYER_SET_NAME(InsideOut,"inside_out");
+SYNFIG_LAYER_SET_LOCAL_NAME(InsideOut,_("InsideOut"));
+SYNFIG_LAYER_SET_CATEGORY(InsideOut,_("Distortions"));
+SYNFIG_LAYER_SET_VERSION(InsideOut,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(InsideOut,"$Id: insideout.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
return ValueBase();
}
-sinfg::Layer::Handle
-InsideOut::hit_check(sinfg::Context context, const sinfg::Point &p)const
+synfig::Layer::Handle
+InsideOut::hit_check(synfig::Context context, const synfig::Point &p)const
{
Point pos(p-origin);
Real inv_mag=pos.inv_mag();
public:
InsideOut_Trans(const InsideOut* x):layer(x) { }
- sinfg::Vector perform(const sinfg::Vector& x)const
+ synfig::Vector perform(const synfig::Vector& x)const
{
Point pos(x-layer->origin);
Real inv_mag=pos.inv_mag();
return x;
}
- sinfg::Vector unperform(const sinfg::Vector& x)const
+ synfig::Vector unperform(const synfig::Vector& x)const
{
Point pos(x-layer->origin);
Real inv_mag=pos.inv_mag();
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: insideout.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_INSIDEOUT_H
-#define __SINFG_INSIDEOUT_H
+#ifndef __SYNFIG_INSIDEOUT_H
+#define __SYNFIG_INSIDEOUT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
-#include <sinfg/color.h>
-#include <sinfg/context.h>
+#include <synfig/layer.h>
+#include <synfig/color.h>
+#include <synfig/context.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
class InsideOut_Trans;
class InsideOut : public Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
friend class InsideOut_Trans;
private:
virtual bool set_param(const String ¶m, const ValueBase &value);
virtual ValueBase get_param(const String ¶m)const;
virtual Color get_color(Context context, const Point &pos)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
- virtual etl::handle<sinfg::Transform> get_transform()const;
+ virtual etl::handle<synfig::Transform> get_transform()const;
};
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: julia.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
#include "julia.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Julia);
-SINFG_LAYER_SET_NAME(Julia,"julia");
-SINFG_LAYER_SET_LOCAL_NAME(Julia,_("Julia Set"));
-SINFG_LAYER_SET_CATEGORY(Julia,_("Fractals"));
-SINFG_LAYER_SET_VERSION(Julia,"0.1");
-SINFG_LAYER_SET_CVS_ID(Julia,"$Id: julia.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(Julia);
+SYNFIG_LAYER_SET_NAME(Julia,"julia");
+SYNFIG_LAYER_SET_LOCAL_NAME(Julia,_("Julia Set"));
+SYNFIG_LAYER_SET_CATEGORY(Julia,_("Fractals"));
+SYNFIG_LAYER_SET_VERSION(Julia,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Julia,"$Id: julia.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: julia.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_JULIA_H
-#define __SINFG_JULIA_H
+#ifndef __SYNFIG_JULIA_H
+#define __SYNFIG_JULIA_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/angle.h>
+#include <synfig/layer.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/angle.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
-class Julia : public sinfg::Layer
+class Julia : public synfig::Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Color icolor;
- sinfg::Color ocolor;
- sinfg::Angle color_shift;
+ synfig::Color icolor;
+ synfig::Color ocolor;
+ synfig::Angle color_shift;
Real bailout;
Real lp;
int iterations;
- sinfg::Point seed;
+ synfig::Point seed;
bool distort_inside;
bool distort_outside;
public:
Julia();
- virtual bool set_param(const sinfg::String ¶m, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value);
- virtual ValueBase get_param(const sinfg::String ¶m)const;
+ virtual ValueBase get_param(const synfig::String ¶m)const;
- virtual Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual Color get_color(synfig::Context context, const synfig::Point &pos)const;
virtual Vocab get_param_vocab()const;
};
; SectionIn RO
; Set output path to the installation directory.
- SetOutPath "$INSTDIR\lib\sinfg\modules"
+ SetOutPath "$INSTDIR\lib\synfig\modules"
; Put file there
File /oname=lyr_std.dll "src\modules\lyr_std\.libs\liblyr_std-0.dll"
- FileOpen $0 $INSTDIR\etc\sinfg_modules.cfg a
+ FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a
FileSeek $0 0 END
FileWrite $0 "lyr_std"
FileWriteByte $0 "13"
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
-#include <sinfg/string.h>
+#include <synfig/module.h>
+#include <synfig/string.h>
#include "zoom.h"
//#include "blur.h"
MODULE_DESCRIPTION("Provides a basic set of standard layers")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(liblyr_std)
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: mandelbrot.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
#include "mandelbrot.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Mandelbrot);
-SINFG_LAYER_SET_NAME(Mandelbrot,"mandelbrot");
-SINFG_LAYER_SET_LOCAL_NAME(Mandelbrot,_("Mandelbrot Set"));
-SINFG_LAYER_SET_CATEGORY(Mandelbrot,_("Fractals"));
-SINFG_LAYER_SET_VERSION(Mandelbrot,"0.2");
-SINFG_LAYER_SET_CVS_ID(Mandelbrot,"$Id: mandelbrot.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(Mandelbrot);
+SYNFIG_LAYER_SET_NAME(Mandelbrot,"mandelbrot");
+SYNFIG_LAYER_SET_LOCAL_NAME(Mandelbrot,_("Mandelbrot Set"));
+SYNFIG_LAYER_SET_CATEGORY(Mandelbrot,_("Fractals"));
+SYNFIG_LAYER_SET_VERSION(Mandelbrot,"0.2");
+SYNFIG_LAYER_SET_CVS_ID(Mandelbrot,"$Id: mandelbrot.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: mandelbrot.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MANDELBROT_H
-#define __SINFG_MANDELBROT_H
+#ifndef __SYNFIG_MANDELBROT_H
+#define __SYNFIG_MANDELBROT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
-#include <sinfg/color.h>
-#include <sinfg/angle.h>
-#include <sinfg/gradient.h>
+#include <synfig/layer.h>
+#include <synfig/color.h>
+#include <synfig/angle.h>
+#include <synfig/gradient.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
class Mandelbrot : public Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_solidcolor.cpp
** \brief Template Header
**
# include <config.h>
#endif
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include "radialgradient.h"
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(RadialGradient);
-SINFG_LAYER_SET_NAME(RadialGradient,"radial_gradient");
-SINFG_LAYER_SET_LOCAL_NAME(RadialGradient,_("Radial Gradient"));
-SINFG_LAYER_SET_CATEGORY(RadialGradient,_("Gradients"));
-SINFG_LAYER_SET_VERSION(RadialGradient,"0.1");
-SINFG_LAYER_SET_CVS_ID(RadialGradient,"$Id: radialgradient.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(RadialGradient);
+SYNFIG_LAYER_SET_NAME(RadialGradient,"radial_gradient");
+SYNFIG_LAYER_SET_LOCAL_NAME(RadialGradient,_("Radial Gradient"));
+SYNFIG_LAYER_SET_CATEGORY(RadialGradient,_("Gradients"));
+SYNFIG_LAYER_SET_VERSION(RadialGradient,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(RadialGradient,"$Id: radialgradient.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
float
-RadialGradient::calc_supersample(const sinfg::Point &x, float pw,float ph)const
+RadialGradient::calc_supersample(const synfig::Point &x, float pw,float ph)const
{
// return sqrt(pw*pw+ph*ph)/radius;
return 1.2*pw/radius;
}
-sinfg::Layer::Handle
-RadialGradient::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+RadialGradient::hit_check(synfig::Context context, const synfig::Point &point)const
{
if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5)
return const_cast<RadialGradient*>(this);
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: rotate.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $
**
#endif
#include "rotate.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/transform.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/transform.h>
#include <ETL/misc>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Rotate);
-SINFG_LAYER_SET_NAME(Rotate,"rotate");
-SINFG_LAYER_SET_LOCAL_NAME(Rotate,_("Rotate"));
-SINFG_LAYER_SET_CATEGORY(Rotate,_("Transform"));
-SINFG_LAYER_SET_VERSION(Rotate,"0.1");
-SINFG_LAYER_SET_CVS_ID(Rotate,"$Id: rotate.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $");
+SYNFIG_LAYER_INIT(Rotate);
+SYNFIG_LAYER_SET_NAME(Rotate,"rotate");
+SYNFIG_LAYER_SET_LOCAL_NAME(Rotate,_("Rotate"));
+SYNFIG_LAYER_SET_CATEGORY(Rotate,_("Transform"));
+SYNFIG_LAYER_SET_VERSION(Rotate,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Rotate,"$Id: rotate.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $");
/* === P R O C E D U R E S ================================================= */
public:
Rotate_Trans(const Rotate* x):Transform(x->get_guid()),layer(x) { }
- sinfg::Vector perform(const sinfg::Vector& x)const
+ synfig::Vector perform(const synfig::Vector& x)const
{
Point pos(x-layer->origin);
return Point(layer->cos_val*pos[0]-layer->sin_val*pos[1],layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin;
}
- sinfg::Vector unperform(const sinfg::Vector& x)const
+ synfig::Vector unperform(const synfig::Vector& x)const
{
Point pos(x-layer->origin);
return Point(layer->cos_val*pos[0]+layer->sin_val*pos[1],-layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin;
return new Rotate_Trans(this);
}
-sinfg::Layer::Handle
-Rotate::hit_check(sinfg::Context context, const sinfg::Point &p)const
+synfig::Layer::Handle
+Rotate::hit_check(synfig::Context context, const synfig::Point &p)const
{
Point pos(p-origin);
Point newpos(cos_val*pos[0]+sin_val*pos[1],-sin_val*pos[0]+cos_val*pos[1]);
desc.set_br(br);
desc.set_wh(round_to_int(pw*(br[0]-tl[0])),round_to_int(ph*(br[1]-tl[1])));
- //sinfg::warning("given window: [%f,%f]-[%f,%f] %dx%d",renddesc.get_tl()[0],renddesc.get_tl()[1],renddesc.get_br()[0],renddesc.get_br()[1],renddesc.get_w(),renddesc.get_h());
- //sinfg::warning("surface to render: [%f,%f]-[%f,%f] %dx%d",desc.get_tl()[0],desc.get_tl()[1],desc.get_br()[0],desc.get_br()[1],desc.get_w(),desc.get_h());
+ //synfig::warning("given window: [%f,%f]-[%f,%f] %dx%d",renddesc.get_tl()[0],renddesc.get_tl()[1],renddesc.get_br()[0],renddesc.get_br()[1],renddesc.get_w(),renddesc.get_h());
+ //synfig::warning("surface to render: [%f,%f]-[%f,%f] %dx%d",desc.get_tl()[0],desc.get_tl()[1],desc.get_br()[0],desc.get_br()[1],desc.get_w(),desc.get_h());
Surface source;
source.set_wh(desc.get_w(),desc.get_h());
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: rotate.h,v 1.2 2005/01/24 05:00:18 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_ROTATE_H
-#define __SINFG_ROTATE_H
+#ifndef __SYNFIG_ROTATE_H
+#define __SYNFIG_ROTATE_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/vector.h>
-#include <sinfg/angle.h>
-#include <sinfg/layer.h>
+#include <synfig/vector.h>
+#include <synfig/angle.h>
+#include <synfig/layer.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
class Rotate_Trans;
class Rotate : public Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
friend class Rotate_Trans;
private:
Vector origin;
Rotate();
~Rotate();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
- virtual ValueBase get_param(const sinfg::String & param)const;
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
+ virtual ValueBase get_param(const synfig::String & param)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
virtual Rect get_full_bounding_rect(Context context)const;
- virtual etl::handle<sinfg::Transform> get_transform()const;
+ virtual etl::handle<synfig::Transform> get_transform()const;
};
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file shade.cpp
** \brief Template Header
**
#include "shade.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/segment.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/segment.h>
#include <cstring>
#include <ETL/pen>
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace etl;
using namespace std;
/* -- G L O B A L S --------------------------------------------------------- */
-SINFG_LAYER_INIT(Layer_Shade);
-SINFG_LAYER_SET_NAME(Layer_Shade,"shade");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_Shade,_("Shade"));
-SINFG_LAYER_SET_CATEGORY(Layer_Shade,_("Stylize"));
-SINFG_LAYER_SET_VERSION(Layer_Shade,"0.2");
-SINFG_LAYER_SET_CVS_ID(Layer_Shade,"$Id: shade.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_Shade);
+SYNFIG_LAYER_SET_NAME(Layer_Shade,"shade");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Shade,_("Shade"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_Shade,_("Stylize"));
+SYNFIG_LAYER_SET_VERSION(Layer_Shade,"0.2");
+SYNFIG_LAYER_SET_CVS_ID(Layer_Shade,"$Id: shade.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
/* -- F U N C T I O N S ----------------------------------------------------- */
-inline void clamp(sinfg::Vector &v)
+inline void clamp(synfig::Vector &v)
{
if(v[0]<0.0)v[0]=0.0;
if(v[1]<0.0)v[1]=0.0;
workdesc.clear_flags();
workdesc.set_wh(tmpw,tmph);
- //sinfg::info("fw: %d, fh: %d",fw,fh);
+ //synfig::info("fw: %d, fh: %d",fw,fh);
//render the blur fodder
if(!context.accelerated_render(&worksurface,quality,workdesc,&stageone))
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file shade.h
** \brief Template Header
**
/* === H E A D E R S ======================================================= */
-#ifndef __SINFG_LAYER_SHADE_H__
-#define __SINFG_LAYER_SHADE_H__
+#ifndef __SYNFIG_LAYER_SHADE_H__
+#define __SYNFIG_LAYER_SHADE_H__
/* -- H E A D E R S --------------------------------------------------------- */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/blur.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/blur.h>
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
-class Layer_Shade : public sinfg::Layer_Composite
+class Layer_Shade : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Vector size;
+ synfig::Vector size;
int type;
- sinfg::Color color;
- sinfg::Vector offset;
+ synfig::Color color;
+ synfig::Vector offset;
bool invert;
public:
Layer_Shade();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file sphere_distort.cpp
** \brief Sphere Distort File
**
#endif
#include "sphere_distort.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/transform.h>
-
-#include <sinfg/curve_helper.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/transform.h>
+
+#include <synfig/curve_helper.h>
#endif
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_SphereDistort);
-SINFG_LAYER_SET_NAME(Layer_SphereDistort,"spherize");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_SphereDistort,_("Spherize"));
-SINFG_LAYER_SET_CATEGORY(Layer_SphereDistort,_("Distortions"));
-SINFG_LAYER_SET_VERSION(Layer_SphereDistort,"0.2");
-SINFG_LAYER_SET_CVS_ID(Layer_SphereDistort,"$Id: sphere_distort.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_SphereDistort);
+SYNFIG_LAYER_SET_NAME(Layer_SphereDistort,"spherize");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_SphereDistort,_("Spherize"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_SphereDistort,_("Distortions"));
+SYNFIG_LAYER_SET_VERSION(Layer_SphereDistort,"0.2");
+SYNFIG_LAYER_SET_CVS_ID(Layer_SphereDistort,"$Id: sphere_distort.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $");
/* === P R O C E D U R E S ================================================= */
{
connect_dynamic_param("amount",dynamic_param_list().find("percent")->second);
disconnect_dynamic_param("percent");
- sinfg::warning("Layer_SphereDistort::::set_param(): Updated valuenode connection to use the new \"amount\" parameter.");
+ synfig::warning("Layer_SphereDistort::::set_param(): Updated valuenode connection to use the new \"amount\" parameter.");
}
else
- sinfg::warning("Layer_SphereDistort::::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead.");
+ synfig::warning("Layer_SphereDistort::::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead.");
}
return false;
return sphtrans(p, center, radius, percent, type, tmp);
}
-sinfg::Layer::Handle
-Layer_SphereDistort::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Layer_SphereDistort::hit_check(synfig::Context context, const synfig::Point &pos)const
{
bool clipped;
Point point(sphtrans(pos,center,radius,percent,type,clipped));
(type == TYPE_DISTH && (sphr.minx >= windr.maxx || windr.minx >= sphr.maxx)) ||
(type == TYPE_DISTV && (sphr.miny >= windr.maxy || windr.miny >= sphr.maxy)) )
{
- //sinfg::warning("Spherize: Bounding box reject");
+ //synfig::warning("Spherize: Bounding box reject");
return context.accelerated_render(surface,quality,renddesc,cb);
}
- //sinfg::warning("Spherize: Bounding box accept");
+ //synfig::warning("Spherize: Bounding box accept");
}
//Ok, so we overlap some... now expand the window for rendering
//expandr.set_point(tl[0],tl[1]);
//expandr.expand(br[0],br[1]);
- //sinfg::warning("Spherize: Loop through lines and stuff");
+ //synfig::warning("Spherize: Loop through lines and stuff");
for(int i=0; i<4; ++i)
{
- //sinfg::warning("Spherize: %d", i);
+ //synfig::warning("Spherize: %d", i);
Vector p_o = center-origin[i];
//project onto left line
expandr.expand(p[0],p[1]);
}
- /*sinfg::warning("Spherize: Bounding box (%f,%f)-(%f,%f)",
+ /*synfig::warning("Spherize: Bounding box (%f,%f)-(%f,%f)",
expandr.minx,expandr.miny,expandr.maxx,expandr.maxy);*/
//now that we have the bouding rectangle of ALL the pixels (should be...)
//order it so that it's in the same orientation as the tl,br pair
- //sinfg::warning("Spherize: Organize like tl,br");
+ //synfig::warning("Spherize: Organize like tl,br");
Point ntl(0,0),nbr(0,0);
//sort x
nw = renddesc.get_w() + nr - nl;
nh = renddesc.get_h() + nb - nt;
- //sinfg::warning("Spherize: Setting subwindow (%d,%d) (%d,%d) (%d,%d)",nl,nt,nr,nb,nw,nh);
+ //synfig::warning("Spherize: Setting subwindow (%d,%d) (%d,%d) (%d,%d)",nl,nt,nr,nb,nw,nh);
r.set_subwindow(nl,nt,nw,nh);
/*r = renddesc;
nl = 0, nt = 0;*/
}
- //sinfg::warning("Spherize: render background");
+ //synfig::warning("Spherize: render background");
if(!context.accelerated_render(&background,quality,r,cb))
{
- sinfg::warning("SphereDistort: Layer below failed");
+ synfig::warning("SphereDistort: Layer below failed");
return false;
}
Point rtl = r.get_tl();
- //sinfg::warning("Spherize: About to transform");
+ //synfig::warning("Spherize: About to transform");
for(y = 0; y < h; ++y, sample[1] += ph, p.inc_y())
{
if(!(xs >= 0 && xs < nw && ys >= 0 && ys < nh))
{
- //sinfg::warning("Spherize: we failed to account for %f,%f",xs,ys);
+ //synfig::warning("Spherize: we failed to account for %f,%f",xs,ys);
p.put_value(context.get_color(trans));//Color::alpha());
continue;
}
public:
Spherize_Trans(const Layer_SphereDistort* x):Transform(x->get_guid()),layer(x) { }
- sinfg::Vector perform(const sinfg::Vector& x)const
+ synfig::Vector perform(const synfig::Vector& x)const
{
return sphtrans(x,layer->center,layer->radius,-layer->percent,layer->type);
}
- sinfg::Vector unperform(const sinfg::Vector& x)const
+ synfig::Vector unperform(const synfig::Vector& x)const
{
return sphtrans(x,layer->center,layer->radius,layer->percent,layer->type);
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file sphere_distort.h
** \brief Sphere Distort Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_SPHERE_DISTORT_H
-#define __SINFG_SPHERE_DISTORT_H
+#ifndef __SYNFIG_SPHERE_DISTORT_H
+#define __SYNFIG_SPHERE_DISTORT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/vector.h>
-#include <sinfg/rect.h>
+#include <synfig/layer_composite.h>
+#include <synfig/vector.h>
+#include <synfig/rect.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
class Spherize_Trans;
-namespace sinfg
+namespace synfig
{
class Layer_SphereDistort : public Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
friend class Spherize_Trans;
private:
bool clip;
- sinfg::Rect bounds;
+ synfig::Rect bounds;
void sync();
Layer_SphereDistort();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Rect get_bounding_rect()const;
virtual Vocab get_param_vocab()const;
- virtual etl::handle<sinfg::Transform> get_transform()const;
+ virtual etl::handle<synfig::Transform> get_transform()const;
}; // END of class Layer_SphereDistort
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file stretch.cpp
** \brief Template Header
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
#endif
#include "stretch.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/transform.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/transform.h>
#endif
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_Stretch);
-SINFG_LAYER_SET_NAME(Layer_Stretch,"stretch");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_Stretch,_("Stretch"));
-SINFG_LAYER_SET_CATEGORY(Layer_Stretch,_("Distortions"));
-SINFG_LAYER_SET_VERSION(Layer_Stretch,"0.1");
-SINFG_LAYER_SET_CVS_ID(Layer_Stretch,"$Id: stretch.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_Stretch);
+SYNFIG_LAYER_SET_NAME(Layer_Stretch,"stretch");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Stretch,_("Stretch"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_Stretch,_("Distortions"));
+SYNFIG_LAYER_SET_VERSION(Layer_Stretch,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Layer_Stretch,"$Id: stretch.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
return ret;
}
-sinfg::Layer::Handle
-Layer_Stretch::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Layer_Stretch::hit_check(synfig::Context context, const synfig::Point &pos)const
{
Point npos(pos);
npos[0]=(npos[0]-center[0])/amount[0]+center[0];
public:
Stretch_Trans(const Layer_Stretch* x):Transform(x->get_guid()),layer(x) { }
- sinfg::Vector perform(const sinfg::Vector& x)const
+ synfig::Vector perform(const synfig::Vector& x)const
{
return Vector((x[0]-layer->center[0])*layer->amount[0]+layer->center[0],(x[1]-layer->center[1])*layer->amount[1]+layer->center[1]);
}
- sinfg::Vector unperform(const sinfg::Vector& x)const
+ synfig::Vector unperform(const synfig::Vector& x)const
{
return Vector((x[0]-layer->center[0])/layer->amount[0]+layer->center[0],(x[1]-layer->center[1])/layer->amount[1]+layer->center[1]);
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file colorcorrect.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_STRETCH_H
-#define __SINFG_LAYER_STRETCH_H
+#ifndef __SYNFIG_LAYER_STRETCH_H
+#define __SYNFIG_LAYER_STRETCH_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
-#include <sinfg/vector.h>
+#include <synfig/layer.h>
+#include <synfig/vector.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
class Stretch_Trans;
-namespace sinfg {
+namespace synfig {
class Layer_Stretch : public Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
friend class Stretch_Trans;
private:
Layer_Stretch();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
- virtual etl::handle<sinfg::Transform> get_transform()const;
+ virtual etl::handle<synfig::Transform> get_transform()const;
}; // END of class Layer_Stretch
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: supersample.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
#endif
#include "supersample.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-
-#include <sinfg/target.h>
-#include <sinfg/render.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+
+#include <synfig/target.h>
+#include <synfig/render.h>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(SuperSample);
-SINFG_LAYER_SET_NAME(SuperSample,"super_sample");
-SINFG_LAYER_SET_LOCAL_NAME(SuperSample,_("Super Sample"));
-SINFG_LAYER_SET_CATEGORY(SuperSample,_("Other"));
-SINFG_LAYER_SET_VERSION(SuperSample,"0.1");
-SINFG_LAYER_SET_CVS_ID(SuperSample,"$Id: supersample.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(SuperSample);
+SYNFIG_LAYER_SET_NAME(SuperSample,"super_sample");
+SYNFIG_LAYER_SET_LOCAL_NAME(SuperSample,_("Super Sample"));
+SYNFIG_LAYER_SET_CATEGORY(SuperSample,_("Other"));
+SYNFIG_LAYER_SET_VERSION(SuperSample,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(SuperSample,"$Id: supersample.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: supersample.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_SUPERSAMPLE_H
-#define __SINFG_SUPERSAMPLE_H
+#ifndef __SYNFIG_SUPERSAMPLE_H
+#define __SYNFIG_SUPERSAMPLE_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
+#include <synfig/layer.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
-class SuperSample : public sinfg::Layer
+class SuperSample : public synfig::Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
int width, height;
public:
SuperSample();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- virtual sinfg::Rect get_bounding_rect(Context context)const;
+ virtual synfig::Rect get_bounding_rect(Context context)const;
virtual Vocab get_param_vocab()const;
};
/*! ========================================================================
-** Sinfg
+** Synfig
** Image Layer_TimeLoop Layer Implementation
** $Id: timeloop.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
#endif
#include "timeloop.h"
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/value.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/value.h>
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_TimeLoop);
-SINFG_LAYER_SET_NAME(Layer_TimeLoop,"timeloop");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_TimeLoop,_("TimeLoop"));
-SINFG_LAYER_SET_CATEGORY(Layer_TimeLoop,_("Other"));
-SINFG_LAYER_SET_VERSION(Layer_TimeLoop,"0.1");
-SINFG_LAYER_SET_CVS_ID(Layer_TimeLoop,"$Id: timeloop.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_TimeLoop);
+SYNFIG_LAYER_SET_NAME(Layer_TimeLoop,"timeloop");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_TimeLoop,_("TimeLoop"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_TimeLoop,_("Other"));
+SYNFIG_LAYER_SET_VERSION(Layer_TimeLoop,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Layer_TimeLoop,"$Id: timeloop.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file timeloop.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TIMELOOP_H
-#define __SINFG_TIMELOOP_H
+#ifndef __SYNFIG_TIMELOOP_H
+#define __SYNFIG_TIMELOOP_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
-#include <sinfg/color.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
+#include <synfig/layer.h>
+#include <synfig/color.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class Layer_TimeLoop : public sinfg::Layer
+class Layer_TimeLoop : public synfig::Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Time start_time;
- sinfg::Time end_time;
+ synfig::Time start_time;
+ synfig::Time end_time;
protected:
Layer_TimeLoop();
public:
~Layer_TimeLoop();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
virtual Vocab get_param_vocab()const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
- virtual void set_time(sinfg::Context context, sinfg::Time time)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
+ virtual void set_time(synfig::Context context, synfig::Time time)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
};
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: translate.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $
**
#endif
#include "translate.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/canvas.h>
-#include <sinfg/transform.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/canvas.h>
+#include <synfig/transform.h>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Translate);
-SINFG_LAYER_SET_NAME(Translate,"translate");
-SINFG_LAYER_SET_LOCAL_NAME(Translate,_("Translate"));
-SINFG_LAYER_SET_CATEGORY(Translate,_("Transform"));
-SINFG_LAYER_SET_VERSION(Translate,"0.1");
-SINFG_LAYER_SET_CVS_ID(Translate,"$Id: translate.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
+SYNFIG_LAYER_INIT(Translate);
+SYNFIG_LAYER_SET_NAME(Translate,"translate");
+SYNFIG_LAYER_SET_LOCAL_NAME(Translate,_("Translate"));
+SYNFIG_LAYER_SET_CATEGORY(Translate,_("Transform"));
+SYNFIG_LAYER_SET_VERSION(Translate,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Translate,"$Id: translate.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
/* === P R O C E D U R E S ================================================= */
return ret;
}
-sinfg::Layer::Handle
-Translate::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Translate::hit_check(synfig::Context context, const synfig::Point &pos)const
{
return context.hit_check(pos-origin);
}
public:
Translate_Trans(const Translate* x):Transform(x->get_guid()),layer(x) { }
- sinfg::Vector perform(const sinfg::Vector& x)const
+ synfig::Vector perform(const synfig::Vector& x)const
{
return x+layer->origin;
}
- sinfg::Vector unperform(const sinfg::Vector& x)const
+ synfig::Vector unperform(const synfig::Vector& x)const
{
return x-layer->origin;
}
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: translate.h,v 1.2 2005/01/24 03:08:17 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRANSLATE_H
-#define __SINFG_TRANSLATE_H
+#ifndef __SYNFIG_TRANSLATE_H
+#define __SYNFIG_TRANSLATE_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
-#include <sinfg/vector.h>
-#include <sinfg/string.h>
+#include <synfig/layer.h>
+#include <synfig/vector.h>
+#include <synfig/string.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
class Translate : public Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
friend class Translate_Trans;
private:
Vector origin;
Translate();
~Translate();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
virtual Vocab get_param_vocab()const;
- virtual sinfg::Rect get_full_bounding_rect(Context context)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
- virtual etl::handle<sinfg::Transform> get_transform()const;
+ virtual synfig::Rect get_full_bounding_rect(Context context)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
+ virtual etl::handle<synfig::Transform> get_transform()const;
};
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file spiralgradient.cpp
** \brief Template Header
**
# include <config.h>
#endif
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/transform.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/transform.h>
#include "twirl.h"
#endif
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Twirl);
-SINFG_LAYER_SET_NAME(Twirl,"twirl");
-SINFG_LAYER_SET_LOCAL_NAME(Twirl,_("Twirl"));
-SINFG_LAYER_SET_CATEGORY(Twirl,_("Distortions"));
-SINFG_LAYER_SET_VERSION(Twirl,"0.1");
-SINFG_LAYER_SET_CVS_ID(Twirl,"$Id: twirl.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(Twirl);
+SYNFIG_LAYER_SET_NAME(Twirl,"twirl");
+SYNFIG_LAYER_SET_LOCAL_NAME(Twirl,_("Twirl"));
+SYNFIG_LAYER_SET_CATEGORY(Twirl,_("Distortions"));
+SYNFIG_LAYER_SET_VERSION(Twirl,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Twirl,"$Id: twirl.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
return ret;
}
-sinfg::Point
-Twirl::distort(const sinfg::Point &pos,bool reverse)const
+synfig::Point
+Twirl::distort(const synfig::Point &pos,bool reverse)const
{
Point centered(pos-center);
Real mag(centered.mag());
return twirled+center;
}
-sinfg::Layer::Handle
-Twirl::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Twirl::hit_check(synfig::Context context, const synfig::Point &pos)const
{
return context.hit_check(distort(pos));
}
public:
Twirl_Trans(const Twirl* x):Transform(x->get_guid()),layer(x) { }
- sinfg::Vector perform(const sinfg::Vector& x)const
+ synfig::Vector perform(const synfig::Vector& x)const
{
return layer->distort(x,true);
}
- sinfg::Vector unperform(const sinfg::Vector& x)const
+ synfig::Vector unperform(const synfig::Vector& x)const
{
return layer->distort(x,false);
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file twirl.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TWIRL_H
-#define __SINFG_TWIRL_H
+#ifndef __SYNFIG_TWIRL_H
+#define __SYNFIG_TWIRL_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/value.h>
-#include <sinfg/gradient.h>
-#include <sinfg/angle.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/value.h>
+#include <synfig/gradient.h>
+#include <synfig/angle.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
class Twirl_Trans;
-class Twirl : public sinfg::Layer_Composite
+class Twirl : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
friend class Twirl_Trans;
private:
- sinfg::Point center;
+ synfig::Point center;
- sinfg::Real radius;
+ synfig::Real radius;
- sinfg::Angle rotations;
+ synfig::Angle rotations;
bool distort_inside;
bool distort_outside;
- sinfg::Point distort(const sinfg::Point &pos, bool reverse=false)const;
+ synfig::Point distort(const synfig::Point &pos, bool reverse=false)const;
public:
Twirl();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
- //virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
+ //virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
- virtual etl::handle<sinfg::Transform> get_transform()const;
+ virtual etl::handle<synfig::Transform> get_transform()const;
}; // END of class Twirl
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: warp.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $
**
#endif
#include "warp.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/transform.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/transform.h>
#include <ETL/misc>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Warp);
-SINFG_LAYER_SET_NAME(Warp,"warp");
-SINFG_LAYER_SET_LOCAL_NAME(Warp,_("Warp"));
-SINFG_LAYER_SET_CATEGORY(Warp,_("Distortions"));
-SINFG_LAYER_SET_VERSION(Warp,"0.1");
-SINFG_LAYER_SET_CVS_ID(Warp,"$Id: warp.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $");
+SYNFIG_LAYER_INIT(Warp);
+SYNFIG_LAYER_SET_NAME(Warp,"warp");
+SYNFIG_LAYER_SET_LOCAL_NAME(Warp,_("Warp"));
+SYNFIG_LAYER_SET_CATEGORY(Warp,_("Distortions"));
+SYNFIG_LAYER_SET_VERSION(Warp,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Warp,"$Id: warp.cpp,v 1.2 2005/01/24 05:00:18 darco Exp $");
/* === P R O C E D U R E S ================================================= */
public:
Warp_Trans(const Warp* x):Transform(x->get_guid()),layer(x) { }
- sinfg::Vector perform(const sinfg::Vector& x)const
+ synfig::Vector perform(const synfig::Vector& x)const
{
return layer->transform_backward(x);
//Point pos(x-layer->origin);
//return Point(layer->cos_val*pos[0]-layer->sin_val*pos[1],layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin;
}
- sinfg::Vector unperform(const sinfg::Vector& x)const
+ synfig::Vector unperform(const synfig::Vector& x)const
{
return layer->transform_forward(x);
return new Warp_Trans(this);
}
-sinfg::Layer::Handle
-Warp::hit_check(sinfg::Context context, const sinfg::Point &p)const
+synfig::Layer::Handle
+Warp::hit_check(synfig::Context context, const synfig::Point &p)const
{
Point newpos(transform_forward(p));
;
swap(tl[1],br[1]);*/
- //sinfg::warning("given window: [%f,%f]-[%f,%f] %dx%d",tl[0],tl[1],br[0],br[1],renddesc.get_w(),renddesc.get_h());
- //sinfg::warning("Projected: [%f,%f]-[%f,%f]",bounding_rect.get_min()[0],bounding_rect.get_min()[1],bounding_rect.get_max()[0],bounding_rect.get_max()[1]);
+ //synfig::warning("given window: [%f,%f]-[%f,%f] %dx%d",tl[0],tl[1],br[0],br[1],renddesc.get_w(),renddesc.get_h());
+ //synfig::warning("Projected: [%f,%f]-[%f,%f]",bounding_rect.get_min()[0],bounding_rect.get_min()[1],bounding_rect.get_max()[0],bounding_rect.get_max()[1]);
// If we are clipping, then go ahead and clip to the
// source rectangle
desc.set_br(br);
desc.set_wh(ceil_to_int(src_pw*(br[0]-tl[0])),ceil_to_int(src_ph*(br[1]-tl[1])));
- //sinfg::warning("surface to render: [%f,%f]-[%f,%f] %dx%d",desc.get_tl()[0],desc.get_tl()[1],desc.get_br()[0],desc.get_br()[1],desc.get_w(),desc.get_h());
+ //synfig::warning("surface to render: [%f,%f]-[%f,%f] %dx%d",desc.get_tl()[0],desc.get_tl()[1],desc.get_br()[0],desc.get_br()[1],desc.get_w(),desc.get_h());
if(desc.get_w()==0 && desc.get_h()==0)
{
surface->set_wh(renddesc.get_w(),renddesc.get_h());
return true;
}
-sinfg::Rect
+synfig::Rect
Warp::get_bounding_rect()const
{
return Rect::full_plane();
}
-sinfg::Rect
+synfig::Rect
Warp::get_full_bounding_rect(Context context)const
{
// return Rect::full_plane();
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: warp.h,v 1.2 2005/01/24 05:00:18 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_WARP_H
-#define __SINFG_WARP_H
+#ifndef __SYNFIG_WARP_H
+#define __SYNFIG_WARP_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/vector.h>
-#include <sinfg/angle.h>
-#include <sinfg/layer.h>
-#include <sinfg/rect.h>
+#include <synfig/vector.h>
+#include <synfig/angle.h>
+#include <synfig/layer.h>
+#include <synfig/rect.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
class Warp_Trans;
class Warp : public Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
friend class Warp_Trans;
private:
Warp();
~Warp();
- virtual sinfg::Rect get_full_bounding_rect(sinfg::Context context)const;
- virtual sinfg::Rect get_bounding_rect()const;
+ virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const;
+ virtual synfig::Rect get_bounding_rect()const;
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
- virtual ValueBase get_param(const sinfg::String & param)const;
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
+ virtual ValueBase get_param(const synfig::String & param)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
- virtual etl::handle<sinfg::Transform> get_transform()const;
+ virtual etl::handle<synfig::Transform> get_transform()const;
};
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: xorpattern.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
#include "xorpattern.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(XORPattern);
-SINFG_LAYER_SET_NAME(XORPattern,"XORPattern");
-SINFG_LAYER_SET_LOCAL_NAME(XORPattern,_("XOR Pattern"));
-SINFG_LAYER_SET_CATEGORY(XORPattern,_("Other"));
-SINFG_LAYER_SET_VERSION(XORPattern,"0.1");
-SINFG_LAYER_SET_CVS_ID(XORPattern,"$Id: xorpattern.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(XORPattern);
+SYNFIG_LAYER_SET_NAME(XORPattern,"XORPattern");
+SYNFIG_LAYER_SET_LOCAL_NAME(XORPattern,_("XOR Pattern"));
+SYNFIG_LAYER_SET_CATEGORY(XORPattern,_("Other"));
+SYNFIG_LAYER_SET_VERSION(XORPattern,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(XORPattern,"$Id: xorpattern.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: xorpattern.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_XORPATTERN_H
-#define __SINFG_XORPATTERN_H
+#ifndef __SYNFIG_XORPATTERN_H
+#define __SYNFIG_XORPATTERN_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
-#include <sinfg/color.h>
-#include <sinfg/context.h>
-#include <sinfg/vector.h>
+#include <synfig/layer.h>
+#include <synfig/color.h>
+#include <synfig/context.h>
+#include <synfig/vector.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
class XORPattern : public Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file zoom.cpp
** \brief writeme
**
#endif
#include "zoom.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/transform.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/transform.h>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Zoom);
-SINFG_LAYER_SET_NAME(Zoom,"zoom");
-SINFG_LAYER_SET_LOCAL_NAME(Zoom,_("Zoom"));
-SINFG_LAYER_SET_CATEGORY(Zoom,_("Transform"));
-SINFG_LAYER_SET_VERSION(Zoom,"0.1");
-SINFG_LAYER_SET_CVS_ID(Zoom,"$Id: zoom.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
+SYNFIG_LAYER_INIT(Zoom);
+SYNFIG_LAYER_SET_NAME(Zoom,"zoom");
+SYNFIG_LAYER_SET_LOCAL_NAME(Zoom,_("Zoom"));
+SYNFIG_LAYER_SET_CATEGORY(Zoom,_("Transform"));
+SYNFIG_LAYER_SET_VERSION(Zoom,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Zoom,"$Id: zoom.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
/* === P R O C E D U R E S ================================================= */
return ret;
}
-sinfg::Layer::Handle
-Zoom::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Zoom::hit_check(synfig::Context context, const synfig::Point &pos)const
{
return context.hit_check((pos-center)/exp(amount)+center);
}
public:
Zoom_Trans(const Zoom* x):Transform(x->get_guid()),layer(x) { }
- sinfg::Vector perform(const sinfg::Vector& x)const
+ synfig::Vector perform(const synfig::Vector& x)const
{
return (x-layer->center)*exp(layer->amount)+layer->center;
}
- sinfg::Vector unperform(const sinfg::Vector& x)const
+ synfig::Vector unperform(const synfig::Vector& x)const
{
return (x-layer->center)/exp(layer->amount)+layer->center;
}
return context.accelerated_render(surface,quality,desc,cb);
}
-sinfg::Rect
-Zoom::get_full_bounding_rect(sinfg::Context context)const
+synfig::Rect
+Zoom::get_full_bounding_rect(synfig::Context context)const
{
return context.get_full_bounding_rect();
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file zoom.h
** \brief writeme
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_ZOOM_H
-#define __SINFG_ZOOM_H
+#ifndef __SYNFIG_ZOOM_H
+#define __SYNFIG_ZOOM_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
-#include <sinfg/vector.h>
+#include <synfig/layer.h>
+#include <synfig/vector.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
class Zoom : public Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
friend class Zoom_Trans;
private:
Vector center;
public:
Zoom();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
- virtual sinfg::Rect get_full_bounding_rect(sinfg::Context context)const;
- virtual etl::handle<sinfg::Transform> get_transform()const;
+ virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const;
+ virtual etl::handle<synfig::Transform> get_transform()const;
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_bmp/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_bmp/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_bmp.la
libmod_bmp_la_SOURCES = main.cpp trgt_bmp.cpp trgt_bmp.h mptr_bmp.cpp mptr_bmp.h
libmod_bmp_la_LDFLAGS = -module -no-undefined
-libmod_bmp_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_bmp_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_bmp_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_bmp_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file main.cpp
** \brief writeme
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
-#include <sinfg/layer.h>
+#include <synfig/module.h>
+#include <synfig/layer.h>
#include "trgt_bmp.h"
#include "mptr_bmp.h"
MODULE_DESCRIPTION("Provides a Microsoft BMP output target and importer")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mod_bmp)
/*! ========================================================================
-** Sinfg
+** Synfig
** bmp Target Module
** $Id: mptr_bmp.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
#endif
#include "mptr_bmp.h"
-#include <sinfg/general.h>
-#include <sinfg/surface.h>
+#include <synfig/general.h>
+#include <synfig/surface.h>
#include <algorithm>
#include <functional>
/* === U S I N G =========================================================== */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_IMPORTER_INIT(bmp_mptr);
-SINFG_IMPORTER_SET_NAME(bmp_mptr,"bmp_mptr");
-SINFG_IMPORTER_SET_EXT(bmp_mptr,"bmp");
-SINFG_IMPORTER_SET_VERSION(bmp_mptr,"0.1");
-SINFG_IMPORTER_SET_CVS_ID(bmp_mptr,"$Id: mptr_bmp.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_IMPORTER_INIT(bmp_mptr);
+SYNFIG_IMPORTER_SET_NAME(bmp_mptr,"bmp_mptr");
+SYNFIG_IMPORTER_SET_EXT(bmp_mptr,"bmp");
+SYNFIG_IMPORTER_SET_VERSION(bmp_mptr,"0.1");
+SYNFIG_IMPORTER_SET_CVS_ID(bmp_mptr,"$Id: mptr_bmp.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-bmp_mptr::get_frame(sinfg::Surface &surface,Time, sinfg::ProgressCallback *cb)
+bmp_mptr::get_frame(synfig::Surface &surface,Time, synfig::ProgressCallback *cb)
{
FILE *file=fopen(filename.c_str(),"rb");
if(!file)
{
if(cb)cb->error("bmp_mptr::GetFrame(): "+strprintf(_("Unable to open %s"),filename.c_str()));
- else sinfg::error("bmp_mptr::GetFrame(): "+strprintf(_("Unable to open %s"),filename.c_str()));
+ else synfig::error("bmp_mptr::GetFrame(): "+strprintf(_("Unable to open %s"),filename.c_str()));
return false;
}
if(b_char!='B' || m_char!='M')
{
if(cb)cb->error("bmp_mptr::GetFrame(): "+strprintf(_("%s is not in BMP format"),filename.c_str()));
- else sinfg::error("bmp_mptr::GetFrame(): "+strprintf(_("%s is not in BMP format"),filename.c_str()));
+ else synfig::error("bmp_mptr::GetFrame(): "+strprintf(_("%s is not in BMP format"),filename.c_str()));
return false;
}
{
String str("bmp_mptr::get_frame(): "+strprintf(_("Failure while reading BITMAPFILEHEADER from %s"),filename.c_str()));
if(cb)cb->error(str);
- else sinfg::error(str);
+ else synfig::error(str);
return false;
}
{
String str("bmp_mptr::get_frame(): "+strprintf(_("Failure while reading BITMAPINFOHEADER from %s"),filename.c_str()));
if(cb)cb->error(str);
- else sinfg::error(str);
+ else synfig::error(str);
return false;
}
{
String str("bmp_mptr::get_frame(): "+strprintf(_("Bad BITMAPFILEHEADER in %s. (bfOffsetBits=%d, should be %d)"),filename.c_str(),offset,sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER)-2));
if(cb)cb->error(str);
- else sinfg::error(str);
+ else synfig::error(str);
return false;
}
{
String str("bmp_mptr::get_frame(): "+strprintf(_("Bad BITMAPINFOHEADER in %s. (biSize=%d, should be 40)"),filename.c_str(),little_endian(infoheader.biSize)));
if(cb)cb->error(str);
- else sinfg::error(str);
+ else synfig::error(str);
return false;
}
h=little_endian(infoheader.biHeight);
bit_count=little_endian_short(infoheader.biBitCount);
- sinfg::warning("w:%d\n",w);
- sinfg::warning("h:%d\n",h);
- sinfg::warning("bit_count:%d\n",bit_count);
+ synfig::warning("w:%d\n",w);
+ synfig::warning("h:%d\n",h);
+ synfig::warning("bit_count:%d\n",bit_count);
if(little_endian(infoheader.biCompression))
{
if(cb)cb->error("bmp_mptr::GetFrame(): "+string(_("Reading compressed bitmaps is not supported")));
- else sinfg::error("bmp_mptr::GetFrame(): "+string(_("Reading compressed bitmaps is not supported")));
+ else synfig::error("bmp_mptr::GetFrame(): "+string(_("Reading compressed bitmaps is not supported")));
return false;
}
if(bit_count!=24 && bit_count!=32)
{
if(cb)cb->error("bmp_mptr::GetFrame(): "+strprintf(_("Unsupported bit depth (bit_count=%d, should be 24 or 32)"),bit_count));
- else sinfg::error("bmp_mptr::GetFrame(): "+strprintf(_("Unsupported bit depth (bit_count=%d, should be 24 or 32)"),bit_count));
+ else synfig::error("bmp_mptr::GetFrame(): "+strprintf(_("Unsupported bit depth (bit_count=%d, should be 24 or 32)"),bit_count));
return false;
}
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: mptr_bmp.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MPTR_PPM_H
-#define __SINFG_MPTR_PPM_H
+#ifndef __SYNFIG_MPTR_PPM_H
+#define __SYNFIG_MPTR_PPM_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/importer.h>
-#include <sinfg/string.h>
-#include <sinfg/time.h>
+#include <synfig/importer.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
#include <cstdio>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class bmp_mptr : public sinfg::Importer
+class bmp_mptr : public synfig::Importer
{
-SINFG_IMPORTER_MODULE_EXT
+SYNFIG_IMPORTER_MODULE_EXT
private:
- sinfg::String filename;
+ synfig::String filename;
public:
bmp_mptr(const char *filename);
~bmp_mptr();
- virtual bool get_frame(sinfg::Surface &,sinfg::Time, sinfg::ProgressCallback *);
+ virtual bool get_frame(synfig::Surface &,synfig::Time, synfig::ProgressCallback *);
};
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file trgt_bmp.cpp
** \brief Bitmap Target
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
#endif
#include "trgt_bmp.h"
-#include <sinfg/general.h>
+#include <synfig/general.h>
#include <cstdio>
#include <algorithm>
/* === U S I N G =========================================================== */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === I N F O ============================================================= */
-SINFG_TARGET_INIT(bmp);
-SINFG_TARGET_SET_NAME(bmp,"bmp");
-SINFG_TARGET_SET_EXT(bmp,"bmp");
-SINFG_TARGET_SET_VERSION(bmp,"0.1");
-SINFG_TARGET_SET_CVS_ID(bmp,"$Id: trgt_bmp.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_TARGET_INIT(bmp);
+SYNFIG_TARGET_SET_NAME(bmp,"bmp");
+SYNFIG_TARGET_SET_EXT(bmp,"bmp");
+SYNFIG_TARGET_SET_VERSION(bmp,"0.1");
+SYNFIG_TARGET_SET_CVS_ID(bmp,"$Id: trgt_bmp.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === C L A S S E S & S T R U C T S ======================================= */
}
bool
-bmp::start_frame(sinfg::ProgressCallback *callback)
+bmp::start_frame(synfig::ProgressCallback *callback)
{
int w=desc.get_w(),h=desc.get_h();
if(!file)
{
if(callback)callback->error(_("Unable to open file"));
- else sinfg::error(_("Unable to open file"));
+ else synfig::error(_("Unable to open file"));
return false;
}
if(!fwrite(&fileheader.bfSize,sizeof(BITMAPFILEHEADER)-4,1,file))
{
if(callback)callback->error(_("Unable to write file header to file"));
- else sinfg::error(_("Unable to write file header to file"));
+ else synfig::error(_("Unable to write file header to file"));
return false;
}
if(!fwrite(&infoheader,sizeof(BITMAPINFOHEADER),1,file))
{
if(callback)callback->error(_("Unable to write info header"));
- else sinfg::error(_("Unable to write info header"));
+ else synfig::error(_("Unable to write info header"));
return false;
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file trgt_bmp.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_BMP_H
-#define __SINFG_TRGT_BMP_H
+#ifndef __SYNFIG_TRGT_BMP_H
+#define __SYNFIG_TRGT_BMP_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
#include <cstdio>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class bmp : public sinfg::Target_Scanline
+class bmp : public synfig::Target_Scanline
{
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
private:
int rowspan;
int imagecount;
bool multi_image;
FILE *file;
- sinfg::String filename;
+ synfig::String filename;
unsigned char *buffer;
- sinfg::Color *color_buffer;
- sinfg::PixelFormat pf;
+ synfig::Color *color_buffer;
+ synfig::PixelFormat pf;
public:
bmp(const char *filename);
virtual ~bmp();
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
- virtual sinfg::Color * start_scanline(int scanline);
+ virtual synfig::Color * start_scanline(int scanline);
virtual bool end_scanline();
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_dv/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_dv/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_dv.la
libmod_dv_la_SOURCES = main.cpp trgt_dv.cpp trgt_dv.h
libmod_dv_la_LDFLAGS = -module -no-undefined
-libmod_dv_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_dv_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_dv_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_dv_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
else
endif
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "trgt_dv.h"
#endif
MODULE_DESCRIPTION("Provides a DV Stream target (ie: for miniDV stuff)")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mod_dv)
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: trgt_dv.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_TARGET
+#define SYNFIG_TARGET
#ifdef USING_PCH
# include "pch.h"
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_TARGET_INIT(dv_trgt);
-SINFG_TARGET_SET_NAME(dv_trgt,"dv");
-SINFG_TARGET_SET_EXT(dv_trgt,"dv");
-SINFG_TARGET_SET_VERSION(dv_trgt,"0.1");
-SINFG_TARGET_SET_CVS_ID(dv_trgt,"$Id: trgt_dv.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_TARGET_INIT(dv_trgt);
+SYNFIG_TARGET_SET_NAME(dv_trgt,"dv");
+SYNFIG_TARGET_SET_EXT(dv_trgt,"dv");
+SYNFIG_TARGET_SET_VERSION(dv_trgt,"0.1");
+SYNFIG_TARGET_SET_CVS_ID(dv_trgt,"$Id: trgt_dv.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === M E T H O D S ======================================================= */
if(!file)
{
- sinfg::error(_("Unable to open pipe to encodedv"));
+ synfig::error(_("Unable to open pipe to encodedv"));
return false;
}
}
bool
-dv_trgt::start_frame(sinfg::ProgressCallback *callback)
+dv_trgt::start_frame(synfig::ProgressCallback *callback)
{
int w=desc.get_w(),h=desc.get_h();
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: trgt_dv.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_DV_H
-#define __SINFG_TRGT_DV_H
+#ifndef __SYNFIG_TRGT_DV_H
+#define __SYNFIG_TRGT_DV_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
#include <cstdio>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class dv_trgt : public sinfg::Target_Scanline
+class dv_trgt : public synfig::Target_Scanline
{
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
private:
int imagecount;
bool wide_aspect;
FILE *file;
- sinfg::String filename;
+ synfig::String filename;
unsigned char *buffer;
- sinfg::Color *color_buffer;
+ synfig::Color *color_buffer;
public:
dv_trgt(const char *filename);
virtual ~dv_trgt();
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
virtual bool init();
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
- virtual sinfg::Color * start_scanline(int scanline);
+ virtual synfig::Color * start_scanline(int scanline);
virtual bool end_scanline();
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_ffmpeg/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_ffmpeg/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_ffmpeg.la
libmod_ffmpeg_la_SOURCES = main.cpp mptr_ffmpeg.cpp mptr_ffmpeg.h trgt_ffmpeg.cpp trgt_ffmpeg.h
libmod_ffmpeg_la_LDFLAGS = -module -no-undefined
-libmod_ffmpeg_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_ffmpeg_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_ffmpeg_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_ffmpeg_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
else
endif
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "mptr_ffmpeg.h"
#include "trgt_ffmpeg.h"
#endif
MODULE_DESCRIPTION("Provides output targets for each format that FFMPEG supports")
MODULE_AUTHOR("Robert B. Quattlebaum Jr.")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mod_ffmpeg)
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: mptr_ffmpeg.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_IMPORTER_INIT(ffmpeg_mptr);
-SINFG_IMPORTER_SET_NAME(ffmpeg_mptr,"ffmpeg");
-SINFG_IMPORTER_SET_EXT(ffmpeg_mptr,"avi");
-SINFG_IMPORTER_SET_VERSION(ffmpeg_mptr,"0.1");
-SINFG_IMPORTER_SET_CVS_ID(ffmpeg_mptr,"$Id: mptr_ffmpeg.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_IMPORTER_INIT(ffmpeg_mptr);
+SYNFIG_IMPORTER_SET_NAME(ffmpeg_mptr,"ffmpeg");
+SYNFIG_IMPORTER_SET_EXT(ffmpeg_mptr,"avi");
+SYNFIG_IMPORTER_SET_VERSION(ffmpeg_mptr,"0.1");
+SYNFIG_IMPORTER_SET_CVS_ID(ffmpeg_mptr,"$Id: mptr_ffmpeg.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-ffmpeg_mptr::get_frame(sinfg::Surface &surface,Time time, sinfg::ProgressCallback *)
+ffmpeg_mptr::get_frame(synfig::Surface &surface,Time time, synfig::ProgressCallback *)
{
int i=(int)(time*fps);
if(i!=cur_frame)
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: mptr_ffmpeg.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MPTR_FFMPEG_H
-#define __SINFG_MPTR_FFMPEG_H
+#ifndef __SYNFIG_MPTR_FFMPEG_H
+#define __SYNFIG_MPTR_FFMPEG_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/importer.h>
+#include <synfig/importer.h>
#include <stdio.h>
#include "string.h"
#ifdef HAVE_TERMIOS_H
#endif
-#include <sinfg/surface.h>
+#include <synfig/surface.h>
/* === M A C R O S ========================================================= */
/* === T Y P E D E F S ===================================================== */
/* === C L A S S E S & S T R U C T S ======================================= */
-class ffmpeg_mptr : public sinfg::Importer
+class ffmpeg_mptr : public synfig::Importer
{
- SINFG_IMPORTER_MODULE_EXT
+ SYNFIG_IMPORTER_MODULE_EXT
public:
private:
- sinfg::String filename;
+ synfig::String filename;
FILE *file;
int cur_frame;
- sinfg::Surface frame;
+ synfig::Surface frame;
float fps;
#ifdef HAVE_TERMIOS_H
struct termios oldtty;
~ffmpeg_mptr();
- virtual bool get_frame(sinfg::Surface &,sinfg::Time, sinfg::ProgressCallback *);
+ virtual bool get_frame(synfig::Surface &,synfig::Time, synfig::ProgressCallback *);
};
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: trgt_ffmpeg.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_TARGET
+#define SYNFIG_TARGET
#ifdef USING_PCH
# include "pch.h"
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_TARGET_INIT(ffmpeg_trgt);
-SINFG_TARGET_SET_NAME(ffmpeg_trgt,"ffmpeg");
-SINFG_TARGET_SET_EXT(ffmpeg_trgt,"mpg");
-SINFG_TARGET_SET_VERSION(ffmpeg_trgt,"0.1");
-SINFG_TARGET_SET_CVS_ID(ffmpeg_trgt,"$Id: trgt_ffmpeg.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_TARGET_INIT(ffmpeg_trgt);
+SYNFIG_TARGET_SET_NAME(ffmpeg_trgt,"ffmpeg");
+SYNFIG_TARGET_SET_EXT(ffmpeg_trgt,"mpg");
+SYNFIG_TARGET_SET_VERSION(ffmpeg_trgt,"0.1");
+SYNFIG_TARGET_SET_CVS_ID(ffmpeg_trgt,"$Id: trgt_ffmpeg.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === M E T H O D S ======================================================= */
if(!file)
{
- sinfg::error(_("Unable to open pipe to ffmpeg"));
+ synfig::error(_("Unable to open pipe to ffmpeg"));
return false;
}
}
bool
-ffmpeg_trgt::start_frame(sinfg::ProgressCallback *callback)
+ffmpeg_trgt::start_frame(synfig::ProgressCallback *callback)
{
int w=desc.get_w(),h=desc.get_h();
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: trgt_ffmpeg.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_FFMPEG_H
-#define __SINFG_TRGT_FFMPEG_H
+#ifndef __SYNFIG_TRGT_FFMPEG_H
+#define __SYNFIG_TRGT_FFMPEG_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
#include <cstdio>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class ffmpeg_trgt : public sinfg::Target_Scanline
+class ffmpeg_trgt : public synfig::Target_Scanline
{
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
private:
int imagecount;
bool multi_image;
FILE *file;
- sinfg::String filename;
+ synfig::String filename;
unsigned char *buffer;
- sinfg::Color *color_buffer;
+ synfig::Color *color_buffer;
public:
ffmpeg_trgt(const char *filename);
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
virtual bool init();
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
virtual ~ffmpeg_trgt();
- virtual sinfg::Color * start_scanline(int scanline);
+ virtual synfig::Color * start_scanline(int scanline);
virtual bool end_scanline();
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_filter/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_filter/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_filter.la
libmod_filter_la_SOURCES = blur.cpp blur.h colorcorrect.cpp colorcorrect.h halftone2.cpp halftone2.h lumakey.cpp lumakey.h radialblur.cpp radialblur.h main.cpp halftone.cpp halftone.h halftone3.cpp halftone3.h
-libmod_filter_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_filter_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_filter_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_filter_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
libmod_filter_la_LDFLAGS = -module -no-undefined
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file blur.cpp
** \brief Template Header
**
#include "blur.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/segment.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/segment.h>
#include <cstring>
#include <ETL/pen>
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace etl;
using namespace std;
/* -- G L O B A L S --------------------------------------------------------- */
-SINFG_LAYER_INIT(Blur_Layer);
-SINFG_LAYER_SET_NAME(Blur_Layer,"blur");
-SINFG_LAYER_SET_LOCAL_NAME(Blur_Layer,_("Blur"));
-SINFG_LAYER_SET_CATEGORY(Blur_Layer,_("Blurs"));
-SINFG_LAYER_SET_VERSION(Blur_Layer,"0.2");
-SINFG_LAYER_SET_CVS_ID(Blur_Layer,"$Id: blur.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
+SYNFIG_LAYER_INIT(Blur_Layer);
+SYNFIG_LAYER_SET_NAME(Blur_Layer,"blur");
+SYNFIG_LAYER_SET_LOCAL_NAME(Blur_Layer,_("Blur"));
+SYNFIG_LAYER_SET_CATEGORY(Blur_Layer,_("Blurs"));
+SYNFIG_LAYER_SET_VERSION(Blur_Layer,"0.2");
+SYNFIG_LAYER_SET_CVS_ID(Blur_Layer,"$Id: blur.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
/* -- F U N C T I O N S ----------------------------------------------------- */
-inline void clamp(sinfg::Vector &v)
+inline void clamp(synfig::Vector &v)
{
if(v[0]<0.0)v[0]=0.0;
if(v[1]<0.0)v[1]=0.0;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file blur.h
** \brief Template Header
**
/* === H E A D E R S ======================================================= */
-#ifndef __SINFG_LAYER_BLUR_H__
-#define __SINFG_LAYER_BLUR_H__
+#ifndef __SYNFIG_LAYER_BLUR_H__
+#define __SYNFIG_LAYER_BLUR_H__
/* -- H E A D E R S --------------------------------------------------------- */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/blur.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/blur.h>
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
-class Blur_Layer : public sinfg::Layer_Composite
+class Blur_Layer : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Point size;
+ synfig::Point size;
int type;
public:
Blur_Layer();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- virtual sinfg::Rect get_full_bounding_rect(Context context)const;
+ virtual synfig::Rect get_full_bounding_rect(Context context)const;
virtual Vocab get_param_vocab()const;
}; // END of class Blur
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file colorcorrect.cpp
** \brief Template Header
**
#endif
#include "colorcorrect.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_ColorCorrect);
-SINFG_LAYER_SET_NAME(Layer_ColorCorrect,"colorcorrect");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_ColorCorrect,_("Color Correct"));
-SINFG_LAYER_SET_CATEGORY(Layer_ColorCorrect,_("Filters"));
-SINFG_LAYER_SET_VERSION(Layer_ColorCorrect,"0.1");
-SINFG_LAYER_SET_CVS_ID(Layer_ColorCorrect,"$Id: colorcorrect.cpp,v 1.3 2005/01/24 05:00:18 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_ColorCorrect);
+SYNFIG_LAYER_SET_NAME(Layer_ColorCorrect,"colorcorrect");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_ColorCorrect,_("Color Correct"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_ColorCorrect,_("Filters"));
+SYNFIG_LAYER_SET_VERSION(Layer_ColorCorrect,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Layer_ColorCorrect,"$Id: colorcorrect.cpp,v 1.3 2005/01/24 05:00:18 darco Exp $");
/* === P R O C E D U R E S ================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file colorcorrect.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_COLORCORRECT_H
-#define __SINFG_LAYER_COLORCORRECT_H
+#ifndef __SYNFIG_LAYER_COLORCORRECT_H
+#define __SYNFIG_LAYER_COLORCORRECT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer.h>
-#include <sinfg/angle.h>
-#include <sinfg/gamma.h>
-#include <sinfg/rect.h>
+#include <synfig/layer.h>
+#include <synfig/angle.h>
+#include <synfig/gamma.h>
+#include <synfig/rect.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Layer_ColorCorrect : public Layer
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
Layer_ColorCorrect();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Vocab get_param_vocab()const;
}; // END of class Layer_ColorCorrect
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file halftone.cpp
** \brief blehh
**
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
}
float
-Halftone::mask(sinfg::Point point)const
+Halftone::mask(synfig::Point point)const
{
float radius1;
float radius2;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file halftone.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_HALFTONE_H
-#define __SINFG_HALFTONE_H
+#ifndef __SYNFIG_HALFTONE_H
+#define __SYNFIG_HALFTONE_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/vector.h>
-#include <sinfg/angle.h>
+#include <synfig/vector.h>
+#include <synfig/angle.h>
/* === M A C R O S ========================================================= */
public:
int type;
- sinfg::Point offset;
- sinfg::Vector size;
- sinfg::Angle angle;
+ synfig::Point offset;
+ synfig::Vector size;
+ synfig::Angle angle;
- float mask(sinfg::Point point)const;
+ float mask(synfig::Point point)const;
- float operator()(const sinfg::Point &point, const float& intensity, float supersample=0)const;
+ float operator()(const synfig::Point &point, const float& intensity, float supersample=0)const;
};
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file halftone2.cpp
** \brief blehh
**
#include "halftone2.h"
#include "halftone.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Halftone2);
-SINFG_LAYER_SET_NAME(Halftone2,"halftone2");
-SINFG_LAYER_SET_LOCAL_NAME(Halftone2,_("Halftone2"));
-SINFG_LAYER_SET_CATEGORY(Halftone2,_("Filters"));
-SINFG_LAYER_SET_VERSION(Halftone2,"0.0");
-SINFG_LAYER_SET_CVS_ID(Halftone2,"$Id: halftone2.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(Halftone2);
+SYNFIG_LAYER_SET_NAME(Halftone2,"halftone2");
+SYNFIG_LAYER_SET_LOCAL_NAME(Halftone2,_("Halftone2"));
+SYNFIG_LAYER_SET_CATEGORY(Halftone2,_("Filters"));
+SYNFIG_LAYER_SET_VERSION(Halftone2,"0.0");
+SYNFIG_LAYER_SET_CVS_ID(Halftone2,"$Id: halftone2.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
color_dark(Color::black()),
color_light(Color::white())
{
- halftone.offset=(sinfg::Point(0,0));
- halftone.size=(sinfg::Vector(0.25,0.25));
+ halftone.offset=(synfig::Point(0,0));
+ halftone.size=(synfig::Vector(0.25,0.25));
halftone.angle=(Angle::zero());
halftone.type=TYPE_SYMMETRIC;
}
inline float
-Halftone2::calc_supersample(const sinfg::Point &x, float pw,float ph)const
+Halftone2::calc_supersample(const synfig::Point &x, float pw,float ph)const
{
return abs(pw/(halftone.size).mag());
}
-sinfg::Layer::Handle
-Halftone2::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+Halftone2::hit_check(synfig::Context context, const synfig::Point &point)const
{
return const_cast<Halftone2*>(this);
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file halftone2.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_HALFTONE2_H
-#define __SINFG_HALFTONE2_H
+#ifndef __SYNFIG_HALFTONE2_H
+#define __SYNFIG_HALFTONE2_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/vector.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/layer_composite.h>
-#include <sinfg/time.h>
-#include <sinfg/angle.h>
+#include <synfig/vector.h>
+#include <synfig/valuenode.h>
+#include <synfig/layer_composite.h>
+#include <synfig/time.h>
+#include <synfig/angle.h>
#include "halftone.h"
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class Halftone2 : public sinfg::Layer_Composite
+class Halftone2 : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
Halftone halftone;
- sinfg::Color color_dark;
- sinfg::Color color_light;
+ synfig::Color color_dark;
+ synfig::Color color_light;
- sinfg::Color color_func(const sinfg::Point &x, float supersample,const sinfg::Color &under_color)const;
+ synfig::Color color_func(const synfig::Point &x, float supersample,const synfig::Color &under_color)const;
- float calc_supersample(const sinfg::Point &x, float pw,float ph)const;
+ float calc_supersample(const synfig::Point &x, float pw,float ph)const;
- //float halftone_func(sinfg::Point x)const;
+ //float halftone_func(synfig::Point x)const;
public:
Halftone2();
- virtual bool set_param(const sinfg::String ¶m, const sinfg::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String ¶m)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value);
+ virtual synfig::ValueBase get_param(const synfig::String ¶m)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
};
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file halftone3.cpp
** \brief blehh
**
#include "halftone3.h"
#include "halftone.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Halftone3);
-SINFG_LAYER_SET_NAME(Halftone3,"halftone3");
-SINFG_LAYER_SET_LOCAL_NAME(Halftone3,_("Halftone3"));
-SINFG_LAYER_SET_CATEGORY(Halftone3,_("Filters"));
-SINFG_LAYER_SET_VERSION(Halftone3,"0.0");
-SINFG_LAYER_SET_CVS_ID(Halftone3,"$Id: halftone3.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(Halftone3);
+SYNFIG_LAYER_SET_NAME(Halftone3,"halftone3");
+SYNFIG_LAYER_SET_LOCAL_NAME(Halftone3,_("Halftone3"));
+SYNFIG_LAYER_SET_CATEGORY(Halftone3,_("Filters"));
+SYNFIG_LAYER_SET_VERSION(Halftone3,"0.0");
+SYNFIG_LAYER_SET_CVS_ID(Halftone3,"$Id: halftone3.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
Halftone3::Halftone3()
{
- size=(sinfg::Vector(0.25,0.25));
+ size=(synfig::Vector(0.25,0.25));
type=TYPE_SYMMETRIC;
for(int i=0;i<3;i++)
{
tone[i].size=size;
tone[i].type=type;
- tone[i].offset=(sinfg::Point(0,0));
+ tone[i].offset=(synfig::Point(0,0));
tone[i].angle=Angle::deg(30.0)*(float)i;
}
}
inline float
-Halftone3::calc_supersample(const sinfg::Point &x, float pw,float ph)const
+Halftone3::calc_supersample(const synfig::Point &x, float pw,float ph)const
{
return abs(pw/(tone[0].size).mag());
}
-sinfg::Layer::Handle
-Halftone3::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+Halftone3::hit_check(synfig::Context context, const synfig::Point &point)const
{
return const_cast<Halftone3*>(this);
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file halftone3.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_HALFTONE3_H
-#define __SINFG_HALFTONE3_H
+#ifndef __SYNFIG_HALFTONE3_H
+#define __SYNFIG_HALFTONE3_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/vector.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/layer_composite.h>
-#include <sinfg/time.h>
-#include <sinfg/angle.h>
+#include <synfig/vector.h>
+#include <synfig/valuenode.h>
+#include <synfig/layer_composite.h>
+#include <synfig/time.h>
+#include <synfig/angle.h>
#include "halftone.h"
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class Halftone3 : public sinfg::Layer_Composite
+class Halftone3 : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Vector size;
+ synfig::Vector size;
int type;
Halftone tone[3];
- sinfg::Color color[3];
+ synfig::Color color[3];
float inverse_matrix[3][3];
bool subtractive;
- sinfg::Color color_func(const sinfg::Point &x, float supersample,const sinfg::Color &under_color)const;
+ synfig::Color color_func(const synfig::Point &x, float supersample,const synfig::Color &under_color)const;
- float calc_supersample(const sinfg::Point &x, float pw,float ph)const;
+ float calc_supersample(const synfig::Point &x, float pw,float ph)const;
- //float halftone_func(sinfg::Point x)const;
+ //float halftone_func(synfig::Point x)const;
void sync();
public:
Halftone3();
- virtual bool set_param(const sinfg::String ¶m, const sinfg::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String ¶m)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value);
+ virtual synfig::ValueBase get_param(const synfig::String ¶m)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
};
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file checkerboard.cpp
** \brief Template Header
**
#include "lumakey.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/segment.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/segment.h>
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(LumaKey);
-SINFG_LAYER_SET_NAME(LumaKey,"lumakey");
-SINFG_LAYER_SET_LOCAL_NAME(LumaKey,_("LumaKey"));
-SINFG_LAYER_SET_CATEGORY(LumaKey,_("Filters"));
-SINFG_LAYER_SET_VERSION(LumaKey,"0.1");
-SINFG_LAYER_SET_CVS_ID(LumaKey,"$Id: lumakey.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(LumaKey);
+SYNFIG_LAYER_SET_NAME(LumaKey,"lumakey");
+SYNFIG_LAYER_SET_LOCAL_NAME(LumaKey,_("LumaKey"));
+SYNFIG_LAYER_SET_CATEGORY(LumaKey,_("Filters"));
+SYNFIG_LAYER_SET_VERSION(LumaKey,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(LumaKey,"$Id: lumakey.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
return ret;
}
-sinfg::Layer::Handle
-LumaKey::hit_check(sinfg::Context context, const sinfg::Point &getpos)const
+synfig::Layer::Handle
+LumaKey::hit_check(synfig::Context context, const synfig::Point &getpos)const
{
return context.hit_check(getpos);
}
/*! ========================================================================
-** Sinfg
+** Synfig
** Checkerboard Layer
** $Id: lumakey.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LUMAKEY_H
-#define __SINFG_LUMAKEY_H
+#ifndef __SYNFIG_LUMAKEY_H
+#define __SYNFIG_LUMAKEY_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class LumaKey : public sinfg::Layer_Composite, public sinfg::Layer_NoDeform
+class LumaKey : public synfig::Layer_Composite, public synfig::Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
public:
LumaKey();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
virtual Vocab get_param_vocab()const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
- virtual sinfg::Rect get_bounding_rect(sinfg::Context context)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
+ virtual synfig::Rect get_bounding_rect(synfig::Context context)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
};
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
-#include <sinfg/string.h>
-#include <sinfg/canvas.h>
+#include <synfig/module.h>
+#include <synfig/string.h>
+#include <synfig/canvas.h>
#include "blur.h"
#include "colorcorrect.h"
MODULE_DESCRIPTION("Writeme")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(libmod_filter)
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: radialblur.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
#endif
#include "radialblur.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/transform.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/transform.h>
#include <ETL/misc>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(RadialBlur);
-SINFG_LAYER_SET_NAME(RadialBlur,"radial_blur");
-SINFG_LAYER_SET_LOCAL_NAME(RadialBlur,_("Radial Blur"));
-SINFG_LAYER_SET_CATEGORY(RadialBlur,_("Blurs"));
-SINFG_LAYER_SET_VERSION(RadialBlur,"0.1");
-SINFG_LAYER_SET_CVS_ID(RadialBlur,"$Id: radialblur.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(RadialBlur);
+SYNFIG_LAYER_SET_NAME(RadialBlur,"radial_blur");
+SYNFIG_LAYER_SET_LOCAL_NAME(RadialBlur,_("Radial Blur"));
+SYNFIG_LAYER_SET_CATEGORY(RadialBlur,_("Blurs"));
+SYNFIG_LAYER_SET_VERSION(RadialBlur,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(RadialBlur,"$Id: radialblur.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: radialblur.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_RADIALBLUR_H
-#define __SINFG_RADIALBLUR_H
+#ifndef __SYNFIG_RADIALBLUR_H
+#define __SYNFIG_RADIALBLUR_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/vector.h>
-#include <sinfg/angle.h>
-#include <sinfg/layer_composite.h>
+#include <synfig/vector.h>
+#include <synfig/angle.h>
+#include <synfig/layer_composite.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
class RadialBlur : public Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
friend class RadialBlur_Trans;
private:
Vector origin;
RadialBlur();
~RadialBlur();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
- virtual ValueBase get_param(const sinfg::String & param)const;
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
+ virtual ValueBase get_param(const synfig::String & param)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
virtual Vocab get_param_vocab()const;
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_geometry/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_geometry/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_geometry.la
libmod_geometry_la_SOURCES = rectangle.cpp rectangle.h star.h star.cpp checkerboard.cpp checkerboard.h circle.cpp circle.h region.h region.cpp outline.h outline.cpp main.cpp
-libmod_geometry_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_geometry_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_geometry_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_geometry_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
libmod_geometry_la_LDFLAGS = -module -no-undefined
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file checkerboard.cpp
** \brief Template Header
**
#include "checkerboard.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/segment.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/segment.h>
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(CheckerBoard);
-SINFG_LAYER_SET_NAME(CheckerBoard,"checker_board");
-SINFG_LAYER_SET_LOCAL_NAME(CheckerBoard,_("CheckerBoard"));
-SINFG_LAYER_SET_CATEGORY(CheckerBoard,_("Geometry"));
-SINFG_LAYER_SET_VERSION(CheckerBoard,"0.1");
-SINFG_LAYER_SET_CVS_ID(CheckerBoard,"$Id: checkerboard.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(CheckerBoard);
+SYNFIG_LAYER_SET_NAME(CheckerBoard,"checker_board");
+SYNFIG_LAYER_SET_LOCAL_NAME(CheckerBoard,_("CheckerBoard"));
+SYNFIG_LAYER_SET_CATEGORY(CheckerBoard,_("Geometry"));
+SYNFIG_LAYER_SET_VERSION(CheckerBoard,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(CheckerBoard,"$Id: checkerboard.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
}
inline bool
-CheckerBoard::point_test(const sinfg::Point& getpos)const
+CheckerBoard::point_test(const synfig::Point& getpos)const
{
int val=((int)((getpos[0]-pos[0])/size[0])+(int)((getpos[1]-pos[1])/size[1]));
if(getpos[0]-pos[0] < 0.0)
return ret;
}
-sinfg::Layer::Handle
-CheckerBoard::hit_check(sinfg::Context context, const sinfg::Point &getpos)const
+synfig::Layer::Handle
+CheckerBoard::hit_check(synfig::Context context, const synfig::Point &getpos)const
{
if(get_amount()!=0.0 && point_test(getpos))
{
- sinfg::Layer::Handle tmp;
+ synfig::Layer::Handle tmp;
if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(getpos)))
return tmp;
if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(getpos)))
/*! ========================================================================
-** Sinfg
+** Synfig
** Checkerboard Layer
** $Id: checkerboard.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_CHECKERBOARD_H
-#define __SINFG_CHECKERBOARD_H
+#ifndef __SYNFIG_CHECKERBOARD_H
+#define __SYNFIG_CHECKERBOARD_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class CheckerBoard : public sinfg::Layer_Composite, public sinfg::Layer_NoDeform
+class CheckerBoard : public synfig::Layer_Composite, public synfig::Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Color color;
- sinfg::Point pos;
- sinfg::Point size;
+ synfig::Color color;
+ synfig::Point pos;
+ synfig::Point size;
- bool point_test(const sinfg::Point& x)const;
+ bool point_test(const synfig::Point& x)const;
public:
CheckerBoard();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
virtual Vocab get_param_vocab()const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
};
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file circle.cpp
** \brief Template Header
**
#endif
#include "circle.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include <cmath>
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* -- G L O B A L S --------------------------------------------------------- */
-SINFG_LAYER_INIT(Circle);
-SINFG_LAYER_SET_NAME(Circle,"circle");
-SINFG_LAYER_SET_LOCAL_NAME(Circle,_("Circle"));
-SINFG_LAYER_SET_CATEGORY(Circle,_("Geometry"));
-SINFG_LAYER_SET_VERSION(Circle,"0.1");
-SINFG_LAYER_SET_CVS_ID(Circle,"$Id: circle.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
+SYNFIG_LAYER_INIT(Circle);
+SYNFIG_LAYER_SET_NAME(Circle,"circle");
+SYNFIG_LAYER_SET_LOCAL_NAME(Circle,_("Circle"));
+SYNFIG_LAYER_SET_CATEGORY(Circle,_("Geometry"));
+SYNFIG_LAYER_SET_VERSION(Circle,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Circle,"$Id: circle.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
/* -- F U N C T I O N S ----------------------------------------------------- */
return ret;
}
-sinfg::Layer::Handle
-Circle::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+Circle::hit_check(synfig::Context context, const synfig::Point &point)const
{
Point temp=pos-point;
if(in_circle)
{
- sinfg::Layer::Handle tmp;
+ synfig::Layer::Handle tmp;
if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(point)))
return tmp;
if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(point)))
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file circle.h
** \brief Template Header
**
/* === H E A D E R S ======================================================= */
-#ifndef __SINFG_LAYER_CIRCLE_H__
-#define __SINFG_LAYER_CIRCLE_H__
+#ifndef __SYNFIG_LAYER_CIRCLE_H__
+#define __SYNFIG_LAYER_CIRCLE_H__
/* -- H E A D E R S --------------------------------------------------------- */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* -- S T R U C T S & C L A S S E S ----------------------------------------- */
-class Circle : public sinfg::Layer_Composite, public sinfg::Layer_NoDeform
+class Circle : public synfig::Layer_Composite, public synfig::Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Color color;
- sinfg::Point pos;
- sinfg::Real radius;
- sinfg::Real feather;
+ synfig::Color color;
+ synfig::Point pos;
+ synfig::Real radius;
+ synfig::Real feather;
bool invert;
int falloff;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- virtual sinfg::Rect get_full_bounding_rect(sinfg::Context context)const;
- virtual sinfg::Rect get_bounding_rect()const;
+ virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const;
+ virtual synfig::Rect get_bounding_rect()const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
};
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
-#include <sinfg/string.h>
-#include <sinfg/canvas.h>
+#include <synfig/module.h>
+#include <synfig/string.h>
+#include <synfig/canvas.h>
#include "checkerboard.h"
#include "circle.h"
MODULE_DESCRIPTION("writeme")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(libmod_geometry)
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file bline.cpp
** \brief Template
**
#endif
#include "outline.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include <ETL/calculus>
#include <ETL/bezier>
#include <ETL/hermite>
#include <vector>
-#include <sinfg/valuenode_bline.h>
+#include <synfig/valuenode_bline.h>
#endif
#define ROUND_END_FACTOR (4)
#define CUSP_THRESHOLD (0.40)
#define SPIKE_AMOUNT (4)
-#define NO_LOOP_COOKIE sinfg::Vector(84951305,7836658)
+#define NO_LOOP_COOKIE synfig::Vector(84951305,7836658)
#define EPSILON (0.000000001)
#define CUSP_TANGENT_ADJUST (0.025)
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Outline);
-SINFG_LAYER_SET_NAME(Outline,"outline");
-SINFG_LAYER_SET_LOCAL_NAME(Outline,_("Outline"));
-SINFG_LAYER_SET_CATEGORY(Outline,_("Geometry"));
-SINFG_LAYER_SET_VERSION(Outline,"0.2");
-SINFG_LAYER_SET_CVS_ID(Outline,"$Id: outline.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(Outline);
+SYNFIG_LAYER_SET_NAME(Outline,"outline");
+SYNFIG_LAYER_SET_LOCAL_NAME(Outline,_("Outline"));
+SYNFIG_LAYER_SET_CATEGORY(Outline,_("Geometry"));
+SYNFIG_LAYER_SET_VERSION(Outline,"0.2");
+SYNFIG_LAYER_SET_CVS_ID(Outline,"$Id: outline.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
#if 1
const bool loop(bline.get_loop());
- const vector<sinfg::BLinePoint> bline_(bline.get_list().begin(),bline.get_list().end());
+ const vector<synfig::BLinePoint> bline_(bline.get_list().begin(),bline.get_list().end());
#define bline bline_
vector<BLinePoint>::const_iterator
if(segment_list.empty())
{
- sinfg::warning("Outline: segment_list is empty, layer disabled");
+ synfig::warning("Outline: segment_list is empty, layer disabled");
clear();
return;
}
for(iter=vector_list.begin();iter!=vector_list.end();++iter)
if(!iter->is_valid())
{
- sinfg::error("Outline::sync(): Bad point in vector_list!");
+ synfig::error("Outline::sync(): Bad point in vector_list!");
}
- //sinfg::info("BLEHH__________--- x:%f, y:%f",vector_list.front()[0],vector_list.front()[1]);
+ //synfig::info("BLEHH__________--- x:%f, y:%f",vector_list.front()[0],vector_list.front()[1]);
}
#endif
#endif
- } catch (...) { sinfg::error("Outline::sync(): Exception thrown"); throw; }
+ } catch (...) { synfig::error("Outline::sync(): Exception thrown"); throw; }
}
#undef bline
{
connect_dynamic_param("bline",dynamic_param_list().find("segment_list")->second);
disconnect_dynamic_param("segment_list");
- sinfg::warning("Outline::set_param(): Updated valuenode connection to use the new \"bline\" parameter.");
+ synfig::warning("Outline::set_param(): Updated valuenode connection to use the new \"bline\" parameter.");
}
else
- sinfg::warning("Outline::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead.");
+ synfig::warning("Outline::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead.");
}
if( (param=="segment_list" || param=="bline") && value.get_type()==ValueBase::TYPE_LIST)
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file bline.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_OUTLINE_H
-#define __SINFG_OUTLINE_H
+#ifndef __SYNFIG_OUTLINE_H
+#define __SYNFIG_OUTLINE_H
/* === H E A D E R S ======================================================= */
#include <list>
#include <vector>
-#include <sinfg/layer_polygon.h>
-#include <sinfg/segment.h>
-#include <sinfg/value.h>
+#include <synfig/layer_polygon.h>
+#include <synfig/segment.h>
+#include <synfig/value.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
-class Outline : public sinfg::Layer_Polygon
+class Outline : public synfig::Layer_Polygon
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::ValueBase bline;
+ synfig::ValueBase bline;
- std::vector<sinfg::Segment> segment_list;
- std::vector<sinfg::Real> width_list;
+ std::vector<synfig::Segment> segment_list;
+ std::vector<synfig::Real> width_list;
bool round_tip[2];
bool loop_;
- sinfg::Real width;
+ synfig::Real width;
- sinfg::Real expand;
+ synfig::Real expand;
Real loopyness;
bool old_version;
//! Updates the polygon data to match the parameters.
void sync();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file rectangle.cpp
** \point2ief Template Header
**
# include <config.h>
#endif
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include <ETL/pen>
#include <ETL/misc>
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Rectangle);
-SINFG_LAYER_SET_NAME(Rectangle,"rectangle");
-SINFG_LAYER_SET_LOCAL_NAME(Rectangle,_("Rectangle"));
-SINFG_LAYER_SET_CATEGORY(Rectangle,_("Geometry"));
-SINFG_LAYER_SET_VERSION(Rectangle,"0.2");
-SINFG_LAYER_SET_CVS_ID(Rectangle,"$Id: rectangle.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
+SYNFIG_LAYER_INIT(Rectangle);
+SYNFIG_LAYER_SET_NAME(Rectangle,"rectangle");
+SYNFIG_LAYER_SET_LOCAL_NAME(Rectangle,_("Rectangle"));
+SYNFIG_LAYER_SET_CATEGORY(Rectangle,_("Geometry"));
+SYNFIG_LAYER_SET_VERSION(Rectangle,"0.2");
+SYNFIG_LAYER_SET_CVS_ID(Rectangle,"$Id: rectangle.cpp,v 1.2 2005/01/24 03:08:17 darco Exp $");
/* === P R O C E D U R E S ================================================= */
return ret;
}
-sinfg::Layer::Handle
-Rectangle::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Rectangle::hit_check(synfig::Context context, const synfig::Point &pos)const
{
if(is_disabled())
return context.hit_check(pos);
if(intersect)
{
- sinfg::Layer::Handle tmp;
+ synfig::Layer::Handle tmp;
if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(pos)))
return tmp;
if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(pos)))
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file rectangle.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_FILLEDRECT_H
-#define __SINFG_FILLEDRECT_H
+#ifndef __SYNFIG_FILLEDRECT_H
+#define __SYNFIG_FILLEDRECT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/value.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/value.h>
#include <list>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class Rectangle : public sinfg::Layer_Composite, public sinfg::Layer_NoDeform
+class Rectangle : public synfig::Layer_Composite, public synfig::Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Color color;
+ synfig::Color color;
- sinfg::Point point1;
- sinfg::Point point2;
+ synfig::Point point1;
+ synfig::Point point2;
- sinfg::Real expand;
+ synfig::Real expand;
bool invert;
Rectangle();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
- virtual sinfg::Rect get_bounding_rect()const;
- virtual sinfg::Rect get_full_bounding_rect(sinfg::Context context)const;
+ virtual synfig::Rect get_bounding_rect()const;
+ virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const;
virtual Vocab get_param_vocab()const;
}; // END of class FilledRect
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: region.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
#include <ETL/bezier>
#include <ETL/hermite>
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/segment.h>
-#include <sinfg/valuenode_bline.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/segment.h>
+#include <synfig/valuenode_bline.h>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Region);
-SINFG_LAYER_SET_NAME(Region,"region");
-SINFG_LAYER_SET_LOCAL_NAME(Region,_("Region"));
-SINFG_LAYER_SET_CATEGORY(Region,_("Geometry"));
-SINFG_LAYER_SET_VERSION(Region,"0.1");
-SINFG_LAYER_SET_CVS_ID(Region,"$Id: region.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(Region);
+SYNFIG_LAYER_SET_NAME(Region,"region");
+SYNFIG_LAYER_SET_LOCAL_NAME(Region,_("Region"));
+SYNFIG_LAYER_SET_CATEGORY(Region,_("Geometry"));
+SYNFIG_LAYER_SET_VERSION(Region,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Region,"$Id: region.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
}
else
{
- sinfg::warning("Region: incorrect type on bline, layer disabled");
+ synfig::warning("Region: incorrect type on bline, layer disabled");
clear();
return;
}
if(segment_list.empty())
{
- sinfg::warning("Region: segment_list is empty, layer disabled");
+ synfig::warning("Region: segment_list is empty, layer disabled");
clear();
return;
}
{
connect_dynamic_param("bline",dynamic_param_list().find("segment_list")->second);
disconnect_dynamic_param("segment_list");
- sinfg::warning("Region::set_param(): Updated valuenode connection to use the new \"bline\" parameter.");
+ synfig::warning("Region::set_param(): Updated valuenode connection to use the new \"bline\" parameter.");
}
else
- sinfg::warning("Region::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead.");
+ synfig::warning("Region::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead.");
}
if( (param=="segment_list" || param=="bline") && value.get_type()==ValueBase::TYPE_LIST)
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: region.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_REGION_H
-#define __SINFG_REGION_H
+#ifndef __SYNFIG_REGION_H
+#define __SYNFIG_REGION_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_polygon.h>
+#include <synfig/layer_polygon.h>
#include <list>
#include <vector>
-#include <sinfg/value.h>
+#include <synfig/value.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg { class Segment; }
+namespace synfig { class Segment; }
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
-class Region : protected sinfg::Layer_Polygon//Shape
+class Region : protected synfig::Layer_Polygon//Shape
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::ValueBase bline;
- std::vector<sinfg::Segment> segment_list;
+ synfig::ValueBase bline;
+ std::vector<synfig::Segment> segment_list;
public:
Region();
//! Updates the polygon data to match the parameters.
void sync();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: star.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
#include <ETL/bezier>
#include <ETL/hermite>
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/segment.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/segment.h>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Star);
-SINFG_LAYER_SET_NAME(Star,"star");
-SINFG_LAYER_SET_LOCAL_NAME(Star,_("Star"));
-SINFG_LAYER_SET_CATEGORY(Star,_("Geometry"));
-SINFG_LAYER_SET_VERSION(Star,"0.1");
-SINFG_LAYER_SET_CVS_ID(Star,"$Id: star.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(Star);
+SYNFIG_LAYER_SET_NAME(Star,"star");
+SYNFIG_LAYER_SET_LOCAL_NAME(Star,_("Star"));
+SYNFIG_LAYER_SET_CATEGORY(Star,_("Geometry"));
+SYNFIG_LAYER_SET_VERSION(Star,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Star,"$Id: star.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: star.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_STAR_H
-#define __SINFG_STAR_H
+#ifndef __SYNFIG_STAR_H
+#define __SYNFIG_STAR_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_polygon.h>
+#include <synfig/layer_polygon.h>
#include <list>
#include <vector>
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
-class Star : protected sinfg::Layer_Polygon
+class Star : protected synfig::Layer_Polygon
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
Real radius1;
//! Updates the polygon data to match the parameters.
void sync();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_gif/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_gif/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_gif.la
libmod_gif_la_SOURCES = main.cpp trgt_gif.cpp trgt_gif.h
libmod_gif_la_LDFLAGS = -module -no-undefined
-libmod_gif_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_gif_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_gif_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_gif_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "trgt_gif.h"
#endif
MODULE_DESCRIPTION("Target for the GIF image format (B/W only)")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mod_gif)
/*! ========================================================================
-** Sinfg
+** Synfig
** BMP Target Module
** $Id: trgt_gif.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_TARGET
+#define SYNFIG_TARGET
#ifdef USING_PCH
# include "pch.h"
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_TARGET_INIT(gif);
-SINFG_TARGET_SET_NAME(gif,"gif");
-SINFG_TARGET_SET_EXT(gif,"gif");
-SINFG_TARGET_SET_VERSION(gif,"0.1");
-SINFG_TARGET_SET_CVS_ID(gif,"$Id: trgt_gif.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_TARGET_INIT(gif);
+SYNFIG_TARGET_SET_NAME(gif,"gif");
+SYNFIG_TARGET_SET_EXT(gif,"gif");
+SYNFIG_TARGET_SET_VERSION(gif,"0.1");
+SYNFIG_TARGET_SET_CVS_ID(gif,"$Id: trgt_gif.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === M E T H O D S ======================================================= */
if(!file)
{
- sinfg::error(strprintf(_("Unable to open \"%s\" for write access!"),filename.c_str()));
+ synfig::error(strprintf(_("Unable to open \"%s\" for write access!"),filename.c_str()));
return false;
}
}
bool
-gif::start_frame(sinfg::ProgressCallback *callback)
+gif::start_frame(synfig::ProgressCallback *callback)
{
// int
// w=desc.get_w(),
if(local_palette)
{
curr_palette=Palette(curr_surface,256/(1<<(8-rootsize))-build_off_previous-1);
- sinfg::info("curr_palette.size()=%d",curr_palette.size());
+ synfig::info("curr_palette.size()=%d",curr_palette.size());
}
int transparent_index(curr_palette.find_closest(Color(1,0,1,0))-curr_palette.begin());
imagecount++;
}
-sinfg::Color*
+synfig::Color*
gif::start_scanline(int scanline)
{
cur_scanline=scanline;
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: trgt_gif.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_GIF_H
-#define __SINFG_TRGT_GIF_H
+#ifndef __SYNFIG_TRGT_GIF_H
+#define __SYNFIG_TRGT_GIF_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
-#include <sinfg/smartfile.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
+#include <synfig/smartfile.h>
#include <cstdio>
-#include <sinfg/surface.h>
-#include <sinfg/palette.h>
+#include <synfig/surface.h>
+#include <synfig/palette.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class gif : public sinfg::Target_Scanline
+class gif : public synfig::Target_Scanline
{
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
private:
// Class for abstracting the
// output of the codes
struct bitstream
{
- sinfg::SmartFILE file;
+ synfig::SmartFILE file;
unsigned char pool;
char curr_bit;
bitstream():pool(0),curr_bit(0),curr_pos(0) {}
- bitstream(sinfg::SmartFILE file):file(file),pool(0),curr_bit(0),curr_pos(0) {}
+ bitstream(synfig::SmartFILE file):file(file),pool(0),curr_bit(0),curr_pos(0) {}
unsigned char buffer[256];
int curr_pos;
private:
bitstream bs;
- sinfg::String filename;
- sinfg::SmartFILE file;
+ synfig::String filename;
+ synfig::SmartFILE file;
int
i, // General-purpose index
codesize, // Current code size
nextcode; // Next code to use
lzwcode *table,*next,*node;
- sinfg::Surface curr_surface;
+ synfig::Surface curr_surface;
etl::surface<unsigned char> curr_frame;
etl::surface<unsigned char> prev_frame;
int loop_count;
bool local_palette;
- sinfg::Palette curr_palette;
+ synfig::Palette curr_palette;
void output_curr_palette();
public:
gif(const char *filename);
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
virtual bool init();
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
virtual ~gif();
- virtual sinfg::Color * start_scanline(int scanline);
+ virtual synfig::Color * start_scanline(int scanline);
virtual bool end_scanline(void);
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_gradient/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_gradient/Makefile.am,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_gradient.la
libmod_gradient_la_SOURCES = curvegradient.cpp curvegradient.h lineargradient.cpp lineargradient.h conicalgradient.cpp conicalgradient.h spiralgradient.cpp spiralgradient.h radialgradient.cpp radialgradient.h main.cpp
-libmod_gradient_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_gradient_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_gradient_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_gradient_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
libmod_gradient_la_LDFLAGS = -module -no-undefined
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file conicalgradient.cpp
** \brief Template Header
**
# include <config.h>
#endif
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/angle.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/angle.h>
#include "conicalgradient.h"
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(ConicalGradient);
-SINFG_LAYER_SET_NAME(ConicalGradient,"conical_gradient");
-SINFG_LAYER_SET_LOCAL_NAME(ConicalGradient,_("Conical Gradient"));
-SINFG_LAYER_SET_CATEGORY(ConicalGradient,_("Gradients"));
-SINFG_LAYER_SET_VERSION(ConicalGradient,"0.1");
-SINFG_LAYER_SET_CVS_ID(ConicalGradient,"$Id: conicalgradient.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(ConicalGradient);
+SYNFIG_LAYER_SET_NAME(ConicalGradient,"conical_gradient");
+SYNFIG_LAYER_SET_LOCAL_NAME(ConicalGradient,_("Conical Gradient"));
+SYNFIG_LAYER_SET_CATEGORY(ConicalGradient,_("Gradients"));
+SYNFIG_LAYER_SET_VERSION(ConicalGradient,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(ConicalGradient,"$Id: conicalgradient.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
}
float
-ConicalGradient::calc_supersample(const sinfg::Point &x, float pw,float ph)const
+ConicalGradient::calc_supersample(const synfig::Point &x, float pw,float ph)const
{
Point adj(x-center);
if(abs(adj[0])<abs(pw*0.5) && abs(adj[1])<abs(ph*0.5))
return (pw/Point(x-center).mag())/(PI*2);
}
-sinfg::Layer::Handle
-ConicalGradient::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+ConicalGradient::hit_check(synfig::Context context, const synfig::Point &point)const
{
if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5)
return const_cast<ConicalGradient*>(this);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file conicalgradient.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_CONICALGRADIENT_H
-#define __SINFG_CONICALGRADIENT_H
+#ifndef __SYNFIG_CONICALGRADIENT_H
+#define __SYNFIG_CONICALGRADIENT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/value.h>
-#include <sinfg/gradient.h>
-#include <sinfg/angle.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/value.h>
+#include <synfig/gradient.h>
+#include <synfig/angle.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class ConicalGradient : public sinfg::Layer_Composite, public sinfg::Layer_NoDeform
+class ConicalGradient : public synfig::Layer_Composite, public synfig::Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Gradient gradient;
+ synfig::Gradient gradient;
- sinfg::Point center;
+ synfig::Point center;
- sinfg::Angle angle;
+ synfig::Angle angle;
bool symmetric;
- sinfg::Color color_func(const sinfg::Point &x, float supersample=0)const;
+ synfig::Color color_func(const synfig::Point &x, float supersample=0)const;
- float calc_supersample(const sinfg::Point &x, float pw,float ph)const;
+ float calc_supersample(const synfig::Point &x, float pw,float ph)const;
public:
ConicalGradient();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
}; // END of class ConicalGradient
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: curvegradient.cpp,v 1.2 2005/01/13 06:48:39 darco Exp $
**
#include "curvegradient.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include <ETL/bezier>
#include <ETL/hermite>
#include <ETL/calculus>
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(CurveGradient);
-SINFG_LAYER_SET_NAME(CurveGradient,"curve_gradient");
-SINFG_LAYER_SET_LOCAL_NAME(CurveGradient,_("Curve Gradient"));
-SINFG_LAYER_SET_CATEGORY(CurveGradient,_("Gradients"));
-SINFG_LAYER_SET_VERSION(CurveGradient,"0.0");
-SINFG_LAYER_SET_CVS_ID(CurveGradient,"$Id: curvegradient.cpp,v 1.2 2005/01/13 06:48:39 darco Exp $");
+SYNFIG_LAYER_INIT(CurveGradient);
+SYNFIG_LAYER_SET_NAME(CurveGradient,"curve_gradient");
+SYNFIG_LAYER_SET_LOCAL_NAME(CurveGradient,_("Curve Gradient"));
+SYNFIG_LAYER_SET_CATEGORY(CurveGradient,_("Gradients"));
+SYNFIG_LAYER_SET_VERSION(CurveGradient,"0.0");
+SYNFIG_LAYER_SET_CVS_ID(CurveGradient,"$Id: curvegradient.cpp,v 1.2 2005/01/13 06:48:39 darco Exp $");
/* === P R O C E D U R E S ================================================= */
-inline float calculate_distance(const sinfg::BLinePoint& a,const sinfg::BLinePoint& b)
+inline float calculate_distance(const synfig::BLinePoint& a,const synfig::BLinePoint& b)
{
#if 1
const Point& c1(a.get_vertex());
#endif
}
-inline float calculate_distance(const std::vector<sinfg::BLinePoint>& bline)
+inline float calculate_distance(const std::vector<synfig::BLinePoint>& bline)
{
- std::vector<sinfg::BLinePoint>::const_iterator iter,next,ret;
- std::vector<sinfg::BLinePoint>::const_iterator end(bline.end());
+ std::vector<synfig::BLinePoint>::const_iterator iter,next,ret;
+ std::vector<synfig::BLinePoint>::const_iterator end(bline.end());
float dist(0);
return dist;
}
-std::vector<sinfg::BLinePoint>::const_iterator
-find_closest(const std::vector<sinfg::BLinePoint>& bline,const Point& p,bool loop=false,float *bline_dist_ret=0)
+std::vector<synfig::BLinePoint>::const_iterator
+find_closest(const std::vector<synfig::BLinePoint>& bline,const Point& p,bool loop=false,float *bline_dist_ret=0)
{
- std::vector<sinfg::BLinePoint>::const_iterator iter,next,ret;
- std::vector<sinfg::BLinePoint>::const_iterator end(bline.end());
+ std::vector<synfig::BLinePoint>::const_iterator iter,next,ret;
+ std::vector<synfig::BLinePoint>::const_iterator end(bline.end());
ret=bline.end();
float dist(100000000000.0);
{
Point point(point_-offset);
- std::vector<sinfg::BLinePoint>::const_iterator iter,next;
+ std::vector<synfig::BLinePoint>::const_iterator iter,next;
// Figure out the BLinePoints we will be using,
// Taking into account looping.
}
float
-CurveGradient::calc_supersample(const sinfg::Point &x, float pw,float ph)const
+CurveGradient::calc_supersample(const synfig::Point &x, float pw,float ph)const
{
// return pw/(p2-p1).mag();
return pw;
}
-sinfg::Layer::Handle
-CurveGradient::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+CurveGradient::hit_check(synfig::Context context, const synfig::Point &point)const
{
if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5)
return const_cast<CurveGradient*>(this);
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: curvegradient.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_CURVEGRADIENT_H
-#define __SINFG_CURVEGRADIENT_H
+#ifndef __SYNFIG_CURVEGRADIENT_H
+#define __SYNFIG_CURVEGRADIENT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/vector.h>
-#include <sinfg/layer_composite.h>
-#include <sinfg/gradient.h>
-#include <sinfg/blinepoint.h>
+#include <synfig/vector.h>
+#include <synfig/layer_composite.h>
+#include <synfig/gradient.h>
+#include <synfig/blinepoint.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
class CurveGradient : public Layer_Composite, public Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- std::vector<sinfg::BLinePoint> bline;
+ std::vector<synfig::BLinePoint> bline;
Point p1,p2;
Point offset;
void sync();
- sinfg::Color color_func(const sinfg::Point &x, int quality=10, float supersample=0)const;
+ synfig::Color color_func(const synfig::Point &x, int quality=10, float supersample=0)const;
- float calc_supersample(const sinfg::Point &x, float pw,float ph)const;
+ float calc_supersample(const synfig::Point &x, float pw,float ph)const;
public:
CurveGradient();
virtual ValueBase get_param(const String ¶m)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
};
/*! ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: lineargradient.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
#include "lineargradient.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(LinearGradient);
-SINFG_LAYER_SET_NAME(LinearGradient,"linear_gradient");
-SINFG_LAYER_SET_LOCAL_NAME(LinearGradient,_("Linear Gradient"));
-SINFG_LAYER_SET_CATEGORY(LinearGradient,_("Gradients"));
-SINFG_LAYER_SET_VERSION(LinearGradient,"0.0");
-SINFG_LAYER_SET_CVS_ID(LinearGradient,"$Id: lineargradient.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(LinearGradient);
+SYNFIG_LAYER_SET_NAME(LinearGradient,"linear_gradient");
+SYNFIG_LAYER_SET_LOCAL_NAME(LinearGradient,_("Linear Gradient"));
+SYNFIG_LAYER_SET_CATEGORY(LinearGradient,_("Gradients"));
+SYNFIG_LAYER_SET_VERSION(LinearGradient,"0.0");
+SYNFIG_LAYER_SET_CVS_ID(LinearGradient,"$Id: lineargradient.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
}
float
-LinearGradient::calc_supersample(const sinfg::Point &x, float pw,float ph)const
+LinearGradient::calc_supersample(const synfig::Point &x, float pw,float ph)const
{
return pw/(p2-p1).mag();
}
-sinfg::Layer::Handle
-LinearGradient::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+LinearGradient::hit_check(synfig::Context context, const synfig::Point &point)const
{
if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5)
return const_cast<LinearGradient*>(this);
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: lineargradient.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_INTERPOLATION_LINEARGRADIENT_H
-#define __SINFG_INTERPOLATION_LINEARGRADIENT_H
+#ifndef __SYNFIG_INTERPOLATION_LINEARGRADIENT_H
+#define __SYNFIG_INTERPOLATION_LINEARGRADIENT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/vector.h>
-#include <sinfg/layer_composite.h>
-#include <sinfg/gradient.h>
+#include <synfig/vector.h>
+#include <synfig/layer_composite.h>
+#include <synfig/gradient.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
class LinearGradient : public Layer_Composite, public Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
void sync();
- sinfg::Color color_func(const sinfg::Point &x, float supersample=0)const;
+ synfig::Color color_func(const synfig::Point &x, float supersample=0)const;
- float calc_supersample(const sinfg::Point &x, float pw,float ph)const;
+ float calc_supersample(const synfig::Point &x, float pw,float ph)const;
public:
LinearGradient();
virtual ValueBase get_param(const String ¶m)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
};
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
-#include <sinfg/string.h>
-#include <sinfg/canvas.h>
+#include <synfig/module.h>
+#include <synfig/string.h>
+#include <synfig/canvas.h>
#include "lineargradient.h"
#include "radialgradient.h"
MODULE_DESCRIPTION("Writeme")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(libmod_gradient)
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_solidcolor.cpp
** \brief Template Header
**
# include <config.h>
#endif
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include "radialgradient.h"
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(RadialGradient);
-SINFG_LAYER_SET_NAME(RadialGradient,"radial_gradient");
-SINFG_LAYER_SET_LOCAL_NAME(RadialGradient,_("Radial Gradient"));
-SINFG_LAYER_SET_CATEGORY(RadialGradient,_("Gradients"));
-SINFG_LAYER_SET_VERSION(RadialGradient,"0.1");
-SINFG_LAYER_SET_CVS_ID(RadialGradient,"$Id: radialgradient.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
+SYNFIG_LAYER_INIT(RadialGradient);
+SYNFIG_LAYER_SET_NAME(RadialGradient,"radial_gradient");
+SYNFIG_LAYER_SET_LOCAL_NAME(RadialGradient,_("Radial Gradient"));
+SYNFIG_LAYER_SET_CATEGORY(RadialGradient,_("Gradients"));
+SYNFIG_LAYER_SET_VERSION(RadialGradient,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(RadialGradient,"$Id: radialgradient.cpp,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $");
/* === P R O C E D U R E S ================================================= */
float
-RadialGradient::calc_supersample(const sinfg::Point &x, float pw,float ph)const
+RadialGradient::calc_supersample(const synfig::Point &x, float pw,float ph)const
{
// return sqrt(pw*pw+ph*ph)/radius;
return 1.2*pw/radius;
}
-sinfg::Layer::Handle
-RadialGradient::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+RadialGradient::hit_check(synfig::Context context, const synfig::Point &point)const
{
if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5)
return const_cast<RadialGradient*>(this);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file radialgradient.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_RADIALGRADIENT_H
-#define __SINFG_RADIALGRADIENT_H
+#ifndef __SYNFIG_RADIALGRADIENT_H
+#define __SYNFIG_RADIALGRADIENT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/value.h>
-#include <sinfg/gradient.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/value.h>
+#include <synfig/gradient.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class RadialGradient : public sinfg::Layer_Composite, public sinfg::Layer_NoDeform
+class RadialGradient : public synfig::Layer_Composite, public synfig::Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Gradient gradient;
+ synfig::Gradient gradient;
- sinfg::Point center;
+ synfig::Point center;
- sinfg::Real radius;
+ synfig::Real radius;
bool loop;
bool zigzag;
- sinfg::Color color_func(const sinfg::Point &x, float supersample=0)const;
+ synfig::Color color_func(const synfig::Point &x, float supersample=0)const;
- float calc_supersample(const sinfg::Point &x, float pw,float ph)const;
+ float calc_supersample(const synfig::Point &x, float pw,float ph)const;
public:
RadialGradient();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
}; // END of class RadialGradient
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file spiralgradient.cpp
** \brief Template Header
**
# include <config.h>
#endif
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include "spiralgradient.h"
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(SpiralGradient);
-SINFG_LAYER_SET_NAME(SpiralGradient,"spiral_gradient");
-SINFG_LAYER_SET_LOCAL_NAME(SpiralGradient,_("Spiral Gradient"));
-SINFG_LAYER_SET_CATEGORY(SpiralGradient,_("Gradients"));
-SINFG_LAYER_SET_VERSION(SpiralGradient,"0.1");
-SINFG_LAYER_SET_CVS_ID(SpiralGradient,"$Id: spiralgradient.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
+SYNFIG_LAYER_INIT(SpiralGradient);
+SYNFIG_LAYER_SET_NAME(SpiralGradient,"spiral_gradient");
+SYNFIG_LAYER_SET_LOCAL_NAME(SpiralGradient,_("Spiral Gradient"));
+SYNFIG_LAYER_SET_CATEGORY(SpiralGradient,_("Gradients"));
+SYNFIG_LAYER_SET_VERSION(SpiralGradient,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(SpiralGradient,"$Id: spiralgradient.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
/* === P R O C E D U R E S ================================================= */
}
float
-SpiralGradient::calc_supersample(const sinfg::Point &x, float pw,float ph)const
+SpiralGradient::calc_supersample(const synfig::Point &x, float pw,float ph)const
{
return (1.41421*pw/radius+(1.41421*pw/Point(x-center).mag())/(PI*2))*0.5;
}
-sinfg::Layer::Handle
-SpiralGradient::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+SpiralGradient::hit_check(synfig::Context context, const synfig::Point &point)const
{
if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5)
return const_cast<SpiralGradient*>(this);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file spiralgradient.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_SPIRALGRADIENT_H
-#define __SINFG_SPIRALGRADIENT_H
+#ifndef __SYNFIG_SPIRALGRADIENT_H
+#define __SYNFIG_SPIRALGRADIENT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/layer_composite.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
-#include <sinfg/value.h>
-#include <sinfg/gradient.h>
-#include <sinfg/angle.h>
+#include <synfig/layer_composite.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
+#include <synfig/value.h>
+#include <synfig/gradient.h>
+#include <synfig/angle.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class SpiralGradient : public sinfg::Layer_Composite, public sinfg::Layer_NoDeform
+class SpiralGradient : public synfig::Layer_Composite, public synfig::Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Gradient gradient;
+ synfig::Gradient gradient;
- sinfg::Point center;
+ synfig::Point center;
- sinfg::Real radius;
+ synfig::Real radius;
- sinfg::Angle angle;
+ synfig::Angle angle;
bool clockwise;
- sinfg::Color color_func(const sinfg::Point &x, float supersample=0)const;
+ synfig::Color color_func(const synfig::Point &x, float supersample=0)const;
- float calc_supersample(const sinfg::Point &x, float pw,float ph)const;
+ float calc_supersample(const synfig::Point &x, float pw,float ph)const;
public:
SpiralGradient();
- virtual bool set_param(const sinfg::String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String & param)const;
+ virtual synfig::ValueBase get_param(const synfig::String & param)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
}; // END of class SpiralGradient
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_imagemagick/Makefile.am,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_imagemagick/Makefile.am,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_imagemagick.la
libmod_imagemagick_la_SOURCES = main.cpp mptr_imagemagick.cpp mptr_imagemagick.h trgt_imagemagick.cpp trgt_imagemagick.h
libmod_imagemagick_la_LDFLAGS = -module -no-undefined
-libmod_imagemagick_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_imagemagick_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_imagemagick_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_imagemagick_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
else
endif
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "mptr_imagemagick.h"
#include "trgt_imagemagick.h"
#endif
MODULE_DESCRIPTION("Provides targets and importers for nearly every format that ImageMagick supports")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mod_imagemagick)
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: mptr_imagemagick.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
**
#include <algorithm>
#include <functional>
#include <ETL/stringf>
-#include <sinfg/general.h>
+#include <synfig/general.h>
#endif
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_IMPORTER_INIT(imagemagick_mptr);
-SINFG_IMPORTER_SET_NAME(imagemagick_mptr,"imagemagick");
-SINFG_IMPORTER_SET_EXT(imagemagick_mptr,"miff");
-SINFG_IMPORTER_SET_VERSION(imagemagick_mptr,"0.1");
-SINFG_IMPORTER_SET_CVS_ID(imagemagick_mptr,"$Id: mptr_imagemagick.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
+SYNFIG_IMPORTER_INIT(imagemagick_mptr);
+SYNFIG_IMPORTER_SET_NAME(imagemagick_mptr,"imagemagick");
+SYNFIG_IMPORTER_SET_EXT(imagemagick_mptr,"miff");
+SYNFIG_IMPORTER_SET_VERSION(imagemagick_mptr,"0.1");
+SYNFIG_IMPORTER_SET_CVS_ID(imagemagick_mptr,"$Id: mptr_imagemagick.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-imagemagick_mptr::get_frame(sinfg::Surface &surface,Time time, sinfg::ProgressCallback *cb)
+imagemagick_mptr::get_frame(synfig::Surface &surface,Time time, synfig::ProgressCallback *cb)
{
//#define HAS_LIBPNG 1
if(filename.empty())
{
if(cb)cb->error(_("No file to load"));
- else sinfg::error(_("No file to load"));
+ else synfig::error(_("No file to load"));
return false;
}
string temp_file="/tmp/deleteme.png";
else
command=strprintf("convert \"%s\" \"png32:%s\"\n",filename.c_str(),temp_file.c_str());
- sinfg::info("command=%s",command.c_str());
+ synfig::info("command=%s",command.c_str());
if(system(command.c_str())!=0)
return false;
if(!importer)
{
if(cb)cb->error(_("Unable to open ")+temp_file);
- else sinfg::error(_("Unable to open ")+temp_file);
+ else synfig::error(_("Unable to open ")+temp_file);
return false;
}
if(!importer->get_frame(surface,0,cb))
{
if(cb)cb->error(_("Unable to get frame from ")+temp_file);
- else sinfg::error(_("Unable to get frame from ")+temp_file);
+ else synfig::error(_("Unable to get frame from ")+temp_file);
return false;
}
if(!surface)
{
if(cb)cb->error(_("Bad surface from ")+temp_file);
- else sinfg::error(_("Bad surface from ")+temp_file);
+ else synfig::error(_("Bad surface from ")+temp_file);
return false;
}
if(filename.empty())
{
if(cb)cb->error(_("No file to load"));
- else sinfg::error(_("No file to load"));
+ else synfig::error(_("No file to load"));
return false;
}
if(!file)
{
if(cb)cb->error(_("Unable to open pipe to imagemagick"));
- else sinfg::error(_("Unable to open pipe to imagemagick"));
+ else synfig::error(_("Unable to open pipe to imagemagick"));
return false;
}
int w,h;
if(feof(file))
{
if(cb)cb->error(_("Reached end of stream without finding PPM header"));
- else sinfg::error(_("Reached end of stream without finding PPM header"));
+ else synfig::error(_("Reached end of stream without finding PPM header"));
return false;
}
if(cookie[0]!='P' || cookie[1]!='6')
{
if(cb)cb->error(string(_("stream not in PPM format"))+" \""+cookie[0]+cookie[1]+'"');
- else sinfg::error(string(_("stream not in PPM format"))+" \""+cookie[0]+cookie[1]+'"');
+ else synfig::error(string(_("stream not in PPM format"))+" \""+cookie[0]+cookie[1]+'"');
return false;
}
if(feof(file))
{
if(cb)cb->error(_("Premature end of file (after header)"));
- else sinfg::error(_("Premature end of file (after header)"));
+ else synfig::error(_("Premature end of file (after header)"));
return false;
}
if(feof(file))
{
if(cb)cb->error(_("Premature end of file"));
- else sinfg::error(_("Premature end of file"));
+ else synfig::error(_("Premature end of file"));
return false;
}
float b=gamma().r_U8_to_F32((unsigned char)fgetc(file));
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: mptr_imagemagick.h,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MPTR_IMAGEMAGICK_H
-#define __SINFG_MPTR_IMAGEMAGICK_H
+#ifndef __SYNFIG_MPTR_IMAGEMAGICK_H
+#define __SYNFIG_MPTR_IMAGEMAGICK_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/importer.h>
+#include <synfig/importer.h>
#include <stdio.h>
#include "string.h"
-#include <sinfg/surface.h>
+#include <synfig/surface.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class imagemagick_mptr : public sinfg::Importer
+class imagemagick_mptr : public synfig::Importer
{
- SINFG_IMPORTER_MODULE_EXT
+ SYNFIG_IMPORTER_MODULE_EXT
private:
- sinfg::String filename;
+ synfig::String filename;
FILE *file;
int cur_frame;
- sinfg::Surface frame;
+ synfig::Surface frame;
public:
imagemagick_mptr(const char *filename);
~imagemagick_mptr();
- virtual bool get_frame(sinfg::Surface &,sinfg::Time, sinfg::ProgressCallback *);
+ virtual bool get_frame(synfig::Surface &,synfig::Time, synfig::ProgressCallback *);
};
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: trgt_imagemagick.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_TARGET
+#define SYNFIG_TARGET
#ifdef USING_PCH
# include "pch.h"
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_TARGET_INIT(imagemagick_trgt);
-SINFG_TARGET_SET_NAME(imagemagick_trgt,"imagemagick");
-SINFG_TARGET_SET_EXT(imagemagick_trgt,"miff");
-SINFG_TARGET_SET_VERSION(imagemagick_trgt,"0.1");
-SINFG_TARGET_SET_CVS_ID(imagemagick_trgt,"$Id: trgt_imagemagick.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
+SYNFIG_TARGET_INIT(imagemagick_trgt);
+SYNFIG_TARGET_SET_NAME(imagemagick_trgt,"imagemagick");
+SYNFIG_TARGET_SET_EXT(imagemagick_trgt,"miff");
+SYNFIG_TARGET_SET_VERSION(imagemagick_trgt,"0.1");
+SYNFIG_TARGET_SET_CVS_ID(imagemagick_trgt,"$Id: trgt_imagemagick.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-imagemagick_trgt::start_frame(sinfg::ProgressCallback *cb)
+imagemagick_trgt::start_frame(synfig::ProgressCallback *cb)
{
string command;
{
const char *msg=_("Unable to open pipe to imagemagick's convert utility");
if(cb)cb->error(N_(msg));
- else sinfg::error(N_(msg));
+ else synfig::error(N_(msg));
return false;
}
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: trgt_imagemagick.h,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_IMAGEMAGICK_H
-#define __SINFG_TRGT_IMAGEMAGICK_H
+#ifndef __SYNFIG_TRGT_IMAGEMAGICK_H
+#define __SYNFIG_TRGT_IMAGEMAGICK_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
#include <cstdio>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class imagemagick_trgt : public sinfg::Target_Scanline
+class imagemagick_trgt : public synfig::Target_Scanline
{
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
private:
int imagecount;
bool multi_image;
FILE *file;
- sinfg::String filename;
+ synfig::String filename;
unsigned char *buffer;
- sinfg::Color *color_buffer;
- sinfg::PixelFormat pf;
+ synfig::Color *color_buffer;
+ synfig::PixelFormat pf;
public:
imagemagick_trgt(const char *filename);
virtual ~imagemagick_trgt();
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
virtual bool init();
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
- virtual sinfg::Color * start_scanline(int scanline);
+ virtual synfig::Color * start_scanline(int scanline);
virtual bool end_scanline();
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_jpeg/Makefile.am,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_jpeg/Makefile.am,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_jpeg.la
libmod_jpeg_la_SOURCES = main.cpp trgt_jpeg.cpp trgt_jpeg.h mptr_jpeg.cpp mptr_jpeg.h
libmod_jpeg_la_LDFLAGS = -module @JPEG_LIBS@ -no-undefined
-libmod_jpeg_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_jpeg_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_jpeg_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_jpeg_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
else
endif
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "trgt_jpeg.h"
#include "mptr_jpeg.h"
#endif
MODULE_DESCRIPTION("Provides a JPEG target and importer")
MODULE_AUTHOR("Robert B. Quattlebaum Jr")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mod_jpeg)
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: mptr_jpeg.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
**
#endif
#include "mptr_jpeg.h"
-#include <sinfg/importer.h>
-#include <sinfg/time.h>
-#include <sinfg/general.h>
+#include <synfig/importer.h>
+#include <synfig/time.h>
+#include <synfig/general.h>
#include <cstdio>
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_IMPORTER_INIT(jpeg_mptr);
-SINFG_IMPORTER_SET_NAME(jpeg_mptr,"jpeg_mptr");
-SINFG_IMPORTER_SET_EXT(jpeg_mptr,"jpg");
-SINFG_IMPORTER_SET_VERSION(jpeg_mptr,"0.1");
-SINFG_IMPORTER_SET_CVS_ID(jpeg_mptr,"$Id: mptr_jpeg.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
+SYNFIG_IMPORTER_INIT(jpeg_mptr);
+SYNFIG_IMPORTER_SET_NAME(jpeg_mptr,"jpeg_mptr");
+SYNFIG_IMPORTER_SET_EXT(jpeg_mptr,"jpg");
+SYNFIG_IMPORTER_SET_VERSION(jpeg_mptr,"0.1");
+SYNFIG_IMPORTER_SET_CVS_ID(jpeg_mptr,"$Id: mptr_jpeg.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
/* === M E T H O D S ======================================================= */
if(!buffer)
{
- sinfg::error("jpeg_mptr: error: alloc of \"buffer\" failed (bug?)");
+ synfig::error("jpeg_mptr: error: alloc of \"buffer\" failed (bug?)");
throw String("alloc of \"buffer\" failed (bug?)");
}
break;
default:
- sinfg::error("jpeg_mptr: error: Unsupported color type");
+ synfig::error("jpeg_mptr: error: Unsupported color type");
//! \todo THROW SOMETHING
throw String("error on importer construction, *WRITEME*6");
return;
}
bool
-jpeg_mptr::get_frame(sinfg::Surface &surface,Time, sinfg::ProgressCallback *cb)
+jpeg_mptr::get_frame(synfig::Surface &surface,Time, synfig::ProgressCallback *cb)
{
surface.mirror(surface_buffer);
return true;
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: mptr_jpeg.h,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MPTR_JPEG_H
-#define __SINFG_MPTR_JPEG_H
+#ifndef __SYNFIG_MPTR_JPEG_H
+#define __SYNFIG_MPTR_JPEG_H
/* === H E A D E R S ======================================================= */
#define NOMINMAX
-#include <sinfg/importer.h>
-#include <sinfg/string.h>
-#include <sinfg/surface.h>
+#include <synfig/importer.h>
+#include <synfig/string.h>
+#include <synfig/surface.h>
_ETL_BEGIN_CDECLS
#include <jpeglib.h>
_ETL_END_CDECLS
/* === C L A S S E S & S T R U C T S ======================================= */
-class jpeg_mptr : public sinfg::Importer
+class jpeg_mptr : public synfig::Importer
{
- SINFG_IMPORTER_MODULE_EXT
+ SYNFIG_IMPORTER_MODULE_EXT
private:
- sinfg::String filename;
- sinfg::Surface surface_buffer;
+ synfig::String filename;
+ synfig::Surface surface_buffer;
struct jpeg_decompress_struct cinfo;
jpeg_mptr(const char *filename);
~jpeg_mptr();
- virtual bool get_frame(sinfg::Surface &,sinfg::Time, sinfg::ProgressCallback *);
+ virtual bool get_frame(synfig::Surface &,synfig::Time, synfig::ProgressCallback *);
};
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** jpeg_trgt Target Module
** $Id: trgt_jpeg.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_TARGET
+#define SYNFIG_TARGET
#ifdef USING_PCH
# include "pch.h"
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_TARGET_INIT(jpeg_trgt);
-SINFG_TARGET_SET_NAME(jpeg_trgt,"jpeg");
-SINFG_TARGET_SET_EXT(jpeg_trgt,"jpg");
-SINFG_TARGET_SET_VERSION(jpeg_trgt,"0.1");
-SINFG_TARGET_SET_CVS_ID(jpeg_trgt,"$Id: trgt_jpeg.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
+SYNFIG_TARGET_INIT(jpeg_trgt);
+SYNFIG_TARGET_SET_NAME(jpeg_trgt,"jpeg");
+SYNFIG_TARGET_SET_EXT(jpeg_trgt,"jpg");
+SYNFIG_TARGET_SET_VERSION(jpeg_trgt,"0.1");
+SYNFIG_TARGET_SET_CVS_ID(jpeg_trgt,"$Id: trgt_jpeg.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-jpeg_trgt::start_frame(sinfg::ProgressCallback *callback)
+jpeg_trgt::start_frame(synfig::ProgressCallback *callback)
{
int w=desc.get_w(),h=desc.get_h();
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: trgt_jpeg.h,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_JPEG_H
-#define __SINFG_TRGT_JPEG_H
+#ifndef __SYNFIG_TRGT_JPEG_H
+#define __SYNFIG_TRGT_JPEG_H
/* === H E A D E R S ======================================================= */
#define NOMINMAX
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
#include <cstdio>
_ETL_BEGIN_CDECLS
#include <jpeglib.h>
/* === C L A S S E S & S T R U C T S ======================================= */
-class jpeg_trgt : public sinfg::Target_Scanline
+class jpeg_trgt : public synfig::Target_Scanline
{
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
private:
FILE *file;
int w,h,quality;
bool multi_image,ready;
int imagecount;
- sinfg::String filename;
+ synfig::String filename;
unsigned char *buffer;
- sinfg::Color *color_buffer;
+ synfig::Color *color_buffer;
public:
jpeg_trgt(const char *filename);
virtual ~jpeg_trgt();
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
- virtual sinfg::Color * start_scanline(int scanline);
+ virtual synfig::Color * start_scanline(int scanline);
virtual bool end_scanline();
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_libavcodec/Makefile.am,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_libavcodec/Makefile.am,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
libmod_libavcodec_la_SOURCES = main.cpp trgt_av.cpp trgt_av.h mptr.cpp mptr.h
libmod_libavcodec_la_LDFLAGS = -module -no-undefined -lavcodec -lavformat
-libmod_libavcodec_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_libavcodec_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_libavcodec_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_libavcodec_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
else
endif
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file main.cpp
** \brief writeme
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
-#include <sinfg/layer.h>
+#include <synfig/module.h>
+#include <synfig/layer.h>
//#include "mptr.h"
#include "trgt_av.h"
MODULE_DESCRIPTION("Provides import/export ability for AVI, MPG, ASF, and a variety of other formats.")
MODULE_AUTHOR("Adrian Bentley")
MODULE_VERSION("0.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mod_libavcodec)
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file mptr.cpp
** \brief writeme
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
#endif
#include "mptr.h"
-#include <sinfg/general.h>
-#include <sinfg/surface.h>
+#include <synfig/general.h>
+#include <synfig/surface.h>
#include <algorithm>
#include <functional>
/* === U S I N G =========================================================== */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_IMPORTER_INIT(Importer_LibAVCodec);
-SINFG_IMPORTER_SET_NAME(Importer_LibAVCodec,"Importer_LibAVCodec");
-SINFG_IMPORTER_SET_EXT(Importer_LibAVCodec,"avi");
-SINFG_IMPORTER_SET_VERSION(Importer_LibAVCodec,"0.1");
-SINFG_IMPORTER_SET_CVS_ID(Importer_LibAVCodec,"$Id: mptr.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
+SYNFIG_IMPORTER_INIT(Importer_LibAVCodec);
+SYNFIG_IMPORTER_SET_NAME(Importer_LibAVCodec,"Importer_LibAVCodec");
+SYNFIG_IMPORTER_SET_EXT(Importer_LibAVCodec,"avi");
+SYNFIG_IMPORTER_SET_VERSION(Importer_LibAVCodec,"0.1");
+SYNFIG_IMPORTER_SET_CVS_ID(Importer_LibAVCodec,"$Id: mptr.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-Importer_LibAVCodec::get_frame(sinfg::Surface &surface,Time, sinfg::ProgressCallback *cb)
+Importer_LibAVCodec::get_frame(synfig::Surface &surface,Time, synfig::ProgressCallback *cb)
{
return false;
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file mptr.h
** \brief writeme
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MPTR_H
-#define __SINFG_MPTR_H
+#ifndef __SYNFIG_MPTR_H
+#define __SYNFIG_MPTR_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/importer.h>
-#include <sinfg/string.h>
-#include <sinfg/time.h>
+#include <synfig/importer.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
#include <cstdio>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class Importer_LibAVCodec : public sinfg::Importer
+class Importer_LibAVCodec : public synfig::Importer
{
-SINFG_IMPORTER_MODULE_EXT
+SYNFIG_IMPORTER_MODULE_EXT
private:
- sinfg::String filename;
+ synfig::String filename;
public:
Importer_LibAVCodec(const char *filename);
~Importer_LibAVCodec();
- virtual bool get_frame(sinfg::Surface &,sinfg::Time, sinfg::ProgressCallback *);
+ virtual bool get_frame(synfig::Surface &,synfig::Time, synfig::ProgressCallback *);
};
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file trgt.cpp
** \brief \writeme
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
#include "libavformat/avformat.h"
}
-#include <sinfg/general.h>
+#include <synfig/general.h>
#include <cstdio>
#include <algorithm>
/* === U S I N G =========================================================== */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === I N F O ============================================================= */
-SINFG_TARGET_INIT(Target_LibAVCodec);
-SINFG_TARGET_SET_NAME(Target_LibAVCodec,"libav");
-SINFG_TARGET_SET_EXT(Target_LibAVCodec,"avi");
-SINFG_TARGET_SET_VERSION(Target_LibAVCodec,"0.1");
-SINFG_TARGET_SET_CVS_ID(Target_LibAVCodec,"$Id: trgt_av.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
+SYNFIG_TARGET_INIT(Target_LibAVCodec);
+SYNFIG_TARGET_SET_NAME(Target_LibAVCodec,"libav");
+SYNFIG_TARGET_SET_EXT(Target_LibAVCodec,"avi");
+SYNFIG_TARGET_SET_VERSION(Target_LibAVCodec,"0.1");
+SYNFIG_TARGET_SET_CVS_ID(Target_LibAVCodec,"$Id: trgt_av.cpp,v 1.1.1.1 2005/01/04 01:23:11 darco Exp $");
/* === C L A S S E S & S T R U C T S ======================================= */
codec = avcodec_find_encoder(context->codec_id);
if(!codec)
{
- sinfg::warning("audio-open: could not find codec");
+ synfig::warning("audio-open: could not find codec");
return 0;
}
//open the codec
if(avcodec_open(context, codec) < 0)
{
- sinfg::warning("audio-open: could not open codec");
+ synfig::warning("audio-open: could not open codec");
return 0;
}
//write the compressed audio to a file
if(av_write_frame(formatc, stream->index, &audiobuffer[0], size) != 0)
{
- sinfg::warning("audio-write_frame: unable to write the entire audio frame");
+ synfig::warning("audio-write_frame: unable to write the entire audio frame");
return 0;
}
{
if(!formatc || !stream)
{
- sinfg::warning("Attempt to open a video codec with a bad format or stream");
+ synfig::warning("Attempt to open a video codec with a bad format or stream");
return false;
}
codec = avcodec_find_encoder(context->codec_id);
if(!codec)
{
- sinfg::warning("Open_video: could not find desired codec");
+ synfig::warning("Open_video: could not find desired codec");
return 0;
}
//try to open the codec
if(avcodec_open(context, codec) < 0)
{
- sinfg::warning("open_video: could not open desired codec");
+ synfig::warning("open_video: could not open desired codec");
return 0;
}
/*picture = alloc_picture(PIX_FMT_RGBA32, context->width, context->height);
if(!picture)
{
- sinfg::warning("open_video: could not allocate the picture to be encoded");
+ synfig::warning("open_video: could not allocate the picture to be encoded");
return 0;
}*/
encodable = alloc_picture(context->pix_fmt, context->width, context->height);
if(!encodable)
{
- sinfg::warning("open_video: could not allocate encodable picture");
+ synfig::warning("open_video: could not allocate encodable picture");
return 0;
}
}
{
if(!formatc || !stream)
{
- sinfg::warning("Attempt to open a video codec with a bad format or stream");
+ synfig::warning("Attempt to open a video codec with a bad format or stream");
return false;
}
//error detect - possibly throw later...
if(ret != 0)
{
- sinfg::warning("write_frame: error while writing video frame");
+ synfig::warning("write_frame: error while writing video frame");
return false;
}
}
if(!format)
{
- sinfg::warning("Unable to Guess the output, defaulting to mpeg");
+ synfig::warning("Unable to Guess the output, defaulting to mpeg");
format = guess_format("mpeg", NULL, NULL);
}
if(!format)
{
- sinfg::warning("Unable to find output format");
+ synfig::warning("Unable to find output format");
return 0;
}
formatc = (AVFormatContext *)av_mallocz(sizeof(AVFormatContext));
if(!formatc)
{
- sinfg::warning("Memory error\n");
+ synfig::warning("Memory error\n");
return 0;
}
//set the output format to the one we found
if(av_set_parameters(formatc, ap) < 0)
{
- sinfg::warning("Invalid output formatting parameters");
+ synfig::warning("Invalid output formatting parameters");
return 0;
}
{
if(!vid.open(formatc, video_st))
{
- sinfg::warning("Could not open video encoder");
+ synfig::warning("Could not open video encoder");
return 0;
}
}
{
if(!aud.open(formatc, audio_st))
{
- sinfg::warning("Could not open audio encoder");
+ synfig::warning("Could not open audio encoder");
return 0;
}
}*/
//use libav's file open function (what does it do differently????)
if(url_fopen(&formatc->pb, filename, URL_WRONLY) < 0)
{
- sinfg::warning("Unable to open file: %s", filename);
+ synfig::warning("Unable to open file: %s", filename);
return 0;
}
}
picture = alloc_picture(PIX_FMT_RGB24,vInfo.w,vInfo.h);//video_st->codec.width, video_st->codec.height);
if(!picture)
{
- sinfg::warning("Unable to allocate the temporary AVFrame surface");
+ synfig::warning("Unable to allocate the temporary AVFrame surface");
return 0;
}
st = av_new_stream(formatc, 0);
if(!st)
{
- sinfg::warning("video-add_stream: Unable to allocate stream");
+ synfig::warning("video-add_stream: Unable to allocate stream");
return 0;
}
stream = av_new_stream(formatc, 1);
if(!stream)
{
- sinfg::warning("could not alloc stream");
+ synfig::warning("could not alloc stream");
return 0;
}
//encode the frame and write it to the file
if(!data->vid.write_frame(formatc,video_st,data->picture))
{
- sinfg::warning("Unable to write a frame");
+ synfig::warning("Unable to write a frame");
}
data->frame_count++;
}
bool
-Target_LibAVCodec::start_frame(sinfg::ProgressCallback *callback)
+Target_LibAVCodec::start_frame(synfig::ProgressCallback *callback)
{
//prepare all the color buffer stuff, etc.
//hardcode test for mpeg
if(!data->Initialize(filename.c_str(),NULL))
{
- sinfg::warning("Unable to Initialize the audio video encoders");
+ synfig::warning("Unable to Initialize the audio video encoders");
return 0;
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file trgt.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_H
-#define __SINFG_TRGT_H
+#ifndef __SYNFIG_TRGT_H
+#define __SYNFIG_TRGT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
#include <cstdio>
-#include "sinfg/surface.h"
+#include "synfig/surface.h"
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class Target_LibAVCodec : public sinfg::Target_Scanline
+class Target_LibAVCodec : public synfig::Target_Scanline
{
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
private:
- sinfg::String filename;
+ synfig::String filename;
class LibAVEncoder;
LibAVEncoder *data;
static bool registered;
- sinfg::Surface surface;
+ synfig::Surface surface;
public:
Target_LibAVCodec(const char *filename);
virtual bool init();
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
- virtual sinfg::Color * start_scanline(int scanline);
+ virtual synfig::Color * start_scanline(int scanline);
virtual bool end_scanline();
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_noise/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_noise/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_noise.la
libmod_noise_la_SOURCES = random.cpp random.h distort.cpp distort.h noise.cpp noise.h main.cpp
-libmod_noise_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_noise_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_noise_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_noise_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
libmod_noise_la_LDFLAGS = -module -no-undefined
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file noise.cpp
** \brief blehh
**
#include "distort.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(NoiseDistort);
-SINFG_LAYER_SET_NAME(NoiseDistort,"noise_distort");
-SINFG_LAYER_SET_LOCAL_NAME(NoiseDistort,_("Noise Distort"));
-SINFG_LAYER_SET_CATEGORY(NoiseDistort,_("Distortions"));
-SINFG_LAYER_SET_VERSION(NoiseDistort,"0.0");
-SINFG_LAYER_SET_CVS_ID(NoiseDistort,"$Id: distort.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_LAYER_INIT(NoiseDistort);
+SYNFIG_LAYER_SET_NAME(NoiseDistort,"noise_distort");
+SYNFIG_LAYER_SET_LOCAL_NAME(NoiseDistort,_("Noise Distort"));
+SYNFIG_LAYER_SET_CATEGORY(NoiseDistort,_("Distortions"));
+SYNFIG_LAYER_SET_VERSION(NoiseDistort,"0.0");
+SYNFIG_LAYER_SET_CVS_ID(NoiseDistort,"$Id: distort.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === P R O C E D U R E S ================================================= */
}
inline float
-NoiseDistort::calc_supersample(const sinfg::Point &x, float pw,float ph)const
+NoiseDistort::calc_supersample(const synfig::Point &x, float pw,float ph)const
{
return 0.0f;
}
void
-NoiseDistort::set_time(sinfg::Context context, sinfg::Time t)const
+NoiseDistort::set_time(synfig::Context context, synfig::Time t)const
{
curr_time=t;
context.set_time(t);
}
void
-NoiseDistort::set_time(sinfg::Context context, sinfg::Time t, const sinfg::Point &point)const
+NoiseDistort::set_time(synfig::Context context, synfig::Time t, const synfig::Point &point)const
{
curr_time=t;
context.set_time(t,point);
}
-sinfg::Layer::Handle
-NoiseDistort::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+NoiseDistort::hit_check(synfig::Context context, const synfig::Point &point)const
{
if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5)
return const_cast<NoiseDistort*>(this);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file noise.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_NOISE_DISTORT_H
-#define __SINFG_NOISE_DISTORT_H
+#ifndef __SYNFIG_NOISE_DISTORT_H
+#define __SYNFIG_NOISE_DISTORT_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/vector.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/layer_composite.h>
-#include <sinfg/gradient.h>
-#include <sinfg/time.h>
+#include <synfig/vector.h>
+#include <synfig/valuenode.h>
+#include <synfig/layer_composite.h>
+#include <synfig/gradient.h>
+#include <synfig/time.h>
#include "random.h"
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class NoiseDistort : public sinfg::Layer_Composite
+class NoiseDistort : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Vector size;
+ synfig::Vector size;
Random random;
int smooth;
int detail;
- sinfg::Real speed;
+ synfig::Real speed;
bool turbulent;
- sinfg::Vector displacement;
+ synfig::Vector displacement;
//void sync();
- mutable sinfg::Time curr_time;
+ mutable synfig::Time curr_time;
- sinfg::Color color_func(const sinfg::Point &x, float supersample,sinfg::Context context)const;
+ synfig::Color color_func(const synfig::Point &x, float supersample,synfig::Context context)const;
- float calc_supersample(const sinfg::Point &x, float pw,float ph)const;
+ float calc_supersample(const synfig::Point &x, float pw,float ph)const;
public:
NoiseDistort();
- virtual bool set_param(const sinfg::String ¶m, const sinfg::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String ¶m)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
- //virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
- virtual void set_time(sinfg::Context context, sinfg::Time time)const;
- virtual void set_time(sinfg::Context context, sinfg::Time time, const sinfg::Point &point)const;
- virtual sinfg::Rect get_bounding_rect(sinfg::Context context)const;
+ virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value);
+ virtual synfig::ValueBase get_param(const synfig::String ¶m)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
+ //virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
+ virtual void set_time(synfig::Context context, synfig::Time time)const;
+ virtual void set_time(synfig::Context context, synfig::Time time, const synfig::Point &point)const;
+ virtual synfig::Rect get_bounding_rect(synfig::Context context)const;
virtual Vocab get_param_vocab()const;
};
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
-#include <sinfg/string.h>
-#include <sinfg/canvas.h>
-#include <sinfg/valuenode.h>
+#include <synfig/module.h>
+#include <synfig/string.h>
+#include <synfig/canvas.h>
+#include <synfig/valuenode.h>
#include "noise.h"
#include "distort.h"
MODULE_DESCRIPTION("writeme")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(libmod_noise)
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file noise.cpp
** \brief blehh
**
#include "noise.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#endif
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Noise);
-SINFG_LAYER_SET_NAME(Noise,"noise");
-SINFG_LAYER_SET_LOCAL_NAME(Noise,_("Noise Gradient"));
-SINFG_LAYER_SET_CATEGORY(Noise,_("Gradients"));
-SINFG_LAYER_SET_VERSION(Noise,"0.0");
-SINFG_LAYER_SET_CVS_ID(Noise,"$Id: noise.cpp,v 1.2 2005/01/13 06:48:39 darco Exp $");
+SYNFIG_LAYER_INIT(Noise);
+SYNFIG_LAYER_SET_NAME(Noise,"noise");
+SYNFIG_LAYER_SET_LOCAL_NAME(Noise,_("Noise Gradient"));
+SYNFIG_LAYER_SET_CATEGORY(Noise,_("Gradients"));
+SYNFIG_LAYER_SET_VERSION(Noise,"0.0");
+SYNFIG_LAYER_SET_CVS_ID(Noise,"$Id: noise.cpp,v 1.2 2005/01/13 06:48:39 darco Exp $");
/* === P R O C E D U R E S ================================================= */
}
inline float
-Noise::calc_supersample(const sinfg::Point &x, float pw,float ph)const
+Noise::calc_supersample(const synfig::Point &x, float pw,float ph)const
{
return 0.0f;
}
void
-Noise::set_time(sinfg::Context context, sinfg::Time t)const
+Noise::set_time(synfig::Context context, synfig::Time t)const
{
curr_time=t;
context.set_time(t);
}
void
-Noise::set_time(sinfg::Context context, sinfg::Time t, const sinfg::Point &point)const
+Noise::set_time(synfig::Context context, synfig::Time t, const synfig::Point &point)const
{
curr_time=t;
context.set_time(t,point);
}
-sinfg::Layer::Handle
-Noise::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+Noise::hit_check(synfig::Context context, const synfig::Point &point)const
{
if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5)
return const_cast<Noise*>(this);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file noise.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_NOISE_H
-#define __SINFG_NOISE_H
+#ifndef __SYNFIG_NOISE_H
+#define __SYNFIG_NOISE_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/vector.h>
-#include <sinfg/valuenode.h>
+#include <synfig/vector.h>
+#include <synfig/valuenode.h>
-#include <sinfg/layer_composite.h>
-#include <sinfg/gradient.h>
-#include <sinfg/time.h>
+#include <synfig/layer_composite.h>
+#include <synfig/gradient.h>
+#include <synfig/time.h>
#include "random.h"
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class Noise : public sinfg::Layer_Composite, public sinfg::Layer_NoDeform
+class Noise : public synfig::Layer_Composite, public synfig::Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- sinfg::Vector size;
+ synfig::Vector size;
Random random;
int smooth;
int detail;
bool do_alpha;
- sinfg::Gradient gradient;
- sinfg::Real speed;
+ synfig::Gradient gradient;
+ synfig::Real speed;
bool turbulent;
bool do_displacement;
- sinfg::Vector displacement;
+ synfig::Vector displacement;
//void sync();
- mutable sinfg::Time curr_time;
+ mutable synfig::Time curr_time;
bool super_sample;
- sinfg::Color color_func(const sinfg::Point &x, float supersample,sinfg::Context context)const;
+ synfig::Color color_func(const synfig::Point &x, float supersample,synfig::Context context)const;
- float calc_supersample(const sinfg::Point &x, float pw,float ph)const;
+ float calc_supersample(const synfig::Point &x, float pw,float ph)const;
public:
Noise();
- virtual bool set_param(const sinfg::String ¶m, const sinfg::ValueBase &value);
- virtual sinfg::ValueBase get_param(const sinfg::String ¶m)const;
- virtual sinfg::Color get_color(sinfg::Context context, const sinfg::Point &pos)const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;
- sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
- virtual void set_time(sinfg::Context context, sinfg::Time time)const;
- virtual void set_time(sinfg::Context context, sinfg::Time time, const sinfg::Point &point)const;
+ virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value);
+ virtual synfig::ValueBase get_param(const synfig::String ¶m)const;
+ virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const;
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;
+ synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
+ virtual void set_time(synfig::Context context, synfig::Time time)const;
+ virtual void set_time(synfig::Context context, synfig::Time time, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
};
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file noise.cpp
** \brief blehh
**
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file noise.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_RANDOM_H
-#define __SINFG_RANDOM_H
+#ifndef __SYNFIG_RANDOM_H
+#define __SYNFIG_RANDOM_H
/* === H E A D E R S ======================================================= */
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_openexr/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_openexr/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_openexr.la
libmod_openexr_la_SOURCES = main.cpp mptr_openexr.cpp mptr_openexr.h trgt_openexr.cpp trgt_openexr.h
libmod_openexr_la_LDFLAGS = -module @PNG_LIBS@ -no-undefined
-libmod_openexr_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
-libmod_openexr_la_CXXFLAGS = @SINFG_CFLAGS@
+libmod_openexr_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
+libmod_openexr_la_CXXFLAGS = @SYNFIG_CFLAGS@
else
endif
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
#warning HAVE_CONFIG_H not defined!
#endif
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "trgt_openexr.h"
#include "mptr_openexr.h"
#endif
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: mptr_openexr.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
#endif
#include "mptr_openexr.h"
-#include <sinfg/sinfg.h>
+#include <synfig/synfig.h>
#include <ETL/stringf>
#include <cstdio>
#include <algorithm>
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_IMPORTER_INIT(exr_mptr);
-SINFG_IMPORTER_SET_NAME(exr_mptr,"exr_mptr");
-SINFG_IMPORTER_SET_EXT(exr_mptr,"exr");
-SINFG_IMPORTER_SET_VERSION(exr_mptr,"0.1");
-SINFG_IMPORTER_SET_CVS_ID(exr_mptr,"$Id: mptr_openexr.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_IMPORTER_INIT(exr_mptr);
+SYNFIG_IMPORTER_SET_NAME(exr_mptr,"exr_mptr");
+SYNFIG_IMPORTER_SET_EXT(exr_mptr,"exr");
+SYNFIG_IMPORTER_SET_VERSION(exr_mptr,"0.1");
+SYNFIG_IMPORTER_SET_CVS_ID(exr_mptr,"$Id: mptr_openexr.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-exr_mptr::get_frame(sinfg::Surface &out_surface,Time, sinfg::ProgressCallback *cb)
+exr_mptr::get_frame(synfig::Surface &out_surface,Time, synfig::ProgressCallback *cb)
{
try
{
catch (const std::exception &e)
{
if(cb)cb->error(e.what());
- else sinfg::error(e.what());
+ else synfig::error(e.what());
return false;
}
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: mptr_openexr.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MPTR_OPENEXR_H
-#define __SINFG_MPTR_OPENEXR_H
+#ifndef __SYNFIG_MPTR_OPENEXR_H
+#define __SYNFIG_MPTR_OPENEXR_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/importer.h>
+#include <synfig/importer.h>
#include <stdio.h>
-#include <sinfg/string.h>
+#include <synfig/string.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class exr_mptr : public sinfg::Importer
+class exr_mptr : public synfig::Importer
{
- SINFG_IMPORTER_MODULE_EXT
+ SYNFIG_IMPORTER_MODULE_EXT
private:
- sinfg::String filename;
+ synfig::String filename;
public:
exr_mptr(const char *filename);
~exr_mptr();
- virtual bool get_frame(sinfg::Surface &,sinfg::Time, sinfg::ProgressCallback *);
+ virtual bool get_frame(synfig::Surface &,synfig::Time, synfig::ProgressCallback *);
};
/*! ========================================================================
-** Sinfg
+** Synfig
** exr_trgt Target Module
** $Id: trgt_openexr.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_TARGET
+#define SYNFIG_TARGET
#ifdef USING_PCH
# include "pch.h"
#endif
#include "trgt_openexr.h"
-#include <sinfg/sinfg.h>
+#include <synfig/synfig.h>
#include <ETL/stringf>
#include <cstdio>
#include <algorithm>
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_TARGET_INIT(exr_trgt);
-SINFG_TARGET_SET_NAME(exr_trgt,"exr_trgt");
-SINFG_TARGET_SET_EXT(exr_trgt,"exr");
-SINFG_TARGET_SET_VERSION(exr_trgt,"1.0.4");
-SINFG_TARGET_SET_CVS_ID(exr_trgt,"$Id: trgt_openexr.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_TARGET_INIT(exr_trgt);
+SYNFIG_TARGET_SET_NAME(exr_trgt,"exr_trgt");
+SYNFIG_TARGET_SET_EXT(exr_trgt,"exr");
+SYNFIG_TARGET_SET_VERSION(exr_trgt,"1.0.4");
+SYNFIG_TARGET_SET_CVS_ID(exr_trgt,"$Id: trgt_openexr.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-exr_trgt::start_frame(sinfg::ProgressCallback *cb)
+exr_trgt::start_frame(synfig::ProgressCallback *cb)
{
int w=desc.get_w(),h=desc.get_h();
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: trgt_openexr.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_OPENEXR_H
-#define __SINFG_TRGT_OPENEXR_H
+#ifndef __SYNFIG_TRGT_OPENEXR_H
+#define __SYNFIG_TRGT_OPENEXR_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
-#include <sinfg/surface.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
+#include <synfig/surface.h>
#include <cstdio>
#include <OpenEXR/ImfArray.h>
#include <OpenEXR/ImfRgbaFile.h>
/* === C L A S S E S & S T R U C T S ======================================= */
-class exr_trgt : public sinfg::Target_Scanline
+class exr_trgt : public synfig::Target_Scanline
{
public:
private:
bool multi_image;
int imagecount,scanline;
- sinfg::String filename;
+ synfig::String filename;
Imf::RgbaOutputFile *exr_file;
Imf::Rgba *buffer;
etl::surface<Imf::Rgba> out_surface;
#ifndef USE_HALF_TYPE
- sinfg::Color *buffer_color;
+ synfig::Color *buffer_color;
#endif
bool ready();
exr_trgt(const char *filename);
virtual ~exr_trgt();
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
- virtual sinfg::Color * start_scanline(int scanline);
+ virtual synfig::Color * start_scanline(int scanline);
virtual bool end_scanline(void);
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
};
/* === E N D =============================================================== */
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_particle/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_particle/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_particle.la
libmod_particle_la_SOURCES = random.cpp random.h plant.cpp plant.h main.cpp
-libmod_particle_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_particle_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_particle_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_particle_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
libmod_particle_la_LDFLAGS = -module -no-undefined
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
-#include <sinfg/string.h>
-#include <sinfg/canvas.h>
+#include <synfig/module.h>
+#include <synfig/string.h>
+#include <synfig/canvas.h>
#include "plant.h"
MODULE_DESCRIPTION("writeme")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(libmod_particle)
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file bline.cpp
** \brief Template
**
# include <config.h>
#endif
-#include <sinfg/angle.h>
+#include <synfig/angle.h>
#include "plant.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
#include <ETL/calculus>
#include <ETL/bezier>
#include <ETL/hermite>
#include <vector>
-#include <sinfg/valuenode_bline.h>
+#include <synfig/valuenode_bline.h>
#endif
#define SAMPLES 300
#define ROUND_END_FACTOR (4)
#define CUSP_THRESHOLD (0.15)
-#define NO_LOOP_COOKIE sinfg::Vector(84951305,7836658)
+#define NO_LOOP_COOKIE synfig::Vector(84951305,7836658)
#define EPSILON (0.000000001)
#define CUSP_TANGENT_ADJUST (0.025)
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Plant);
-SINFG_LAYER_SET_NAME(Plant,"plant");
-SINFG_LAYER_SET_LOCAL_NAME(Plant,_("Plant"));
-SINFG_LAYER_SET_CATEGORY(Plant,_("Particle Systems"));
-SINFG_LAYER_SET_VERSION(Plant,"0.1");
-SINFG_LAYER_SET_CVS_ID(Plant,"$Id: plant.cpp,v 1.2 2005/01/13 06:48:39 darco Exp $");
+SYNFIG_LAYER_INIT(Plant);
+SYNFIG_LAYER_SET_NAME(Plant,"plant");
+SYNFIG_LAYER_SET_LOCAL_NAME(Plant,_("Plant"));
+SYNFIG_LAYER_SET_CATEGORY(Plant,_("Particle Systems"));
+SYNFIG_LAYER_SET_VERSION(Plant,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Plant,"$Id: plant.cpp,v 1.2 2005/01/13 06:48:39 darco Exp $");
/* === P R O C E D U R E S ================================================= */
}
void
-Plant::branch(int n,int depth,float t, float stunt_growth, sinfg::Point position,sinfg::Vector vel)const
+Plant::branch(int n,int depth,float t, float stunt_growth, synfig::Point position,synfig::Vector vel)const
{
float next_split((1.0-t)/(splits-depth)+t/*+random_factor*random(40+depth,t*splits,0,0)/splits*/);
for(;t<next_split;t+=step)
if(t>=1.0-stunt_growth)return;
- sinfg::Real sin_v=sinfg::Angle::cos(split_angle).get();
- sinfg::Real cos_v=sinfg::Angle::sin(split_angle).get();
+ synfig::Real sin_v=synfig::Angle::cos(split_angle).get();
+ synfig::Real cos_v=synfig::Angle::sin(split_angle).get();
- sinfg::Vector velocity1(vel[0]*sin_v-vel[1]*cos_v+random_factor*random(2,30+n+depth,t*splits,0.0f,0.0f),vel[0]*cos_v+vel[1]*sin_v+random_factor*random(2,32+n+depth,t*splits,0.0f,0.0f));
- sinfg::Vector velocity2(vel[0]*sin_v+vel[1]*cos_v+random_factor*random(2,31+n+depth,t*splits,0.0f,0.0f),-vel[0]*cos_v+vel[1]*sin_v+random_factor*random(2,33+n+depth,t*splits,0.0f,0.0f));
+ synfig::Vector velocity1(vel[0]*sin_v-vel[1]*cos_v+random_factor*random(2,30+n+depth,t*splits,0.0f,0.0f),vel[0]*cos_v+vel[1]*sin_v+random_factor*random(2,32+n+depth,t*splits,0.0f,0.0f));
+ synfig::Vector velocity2(vel[0]*sin_v+vel[1]*cos_v+random_factor*random(2,31+n+depth,t*splits,0.0f,0.0f),-vel[0]*cos_v+vel[1]*sin_v+random_factor*random(2,33+n+depth,t*splits,0.0f,0.0f));
Plant::branch(n,depth+1,t,stunt_growth,position,velocity1);
Plant::branch(n,depth+1,t,stunt_growth,position,velocity2);
void
Plant::calc_bounding_rect()const
{
- std::vector<sinfg::BLinePoint>::const_iterator iter,next;
+ std::vector<synfig::BLinePoint>::const_iterator iter,next;
bounding_rect=Rect::zero();
if(bline.size()<=2)
return;
- std::vector<sinfg::BLinePoint>::const_iterator iter,next;
+ std::vector<synfig::BLinePoint>::const_iterator iter,next;
etl::hermite<Vector> curve;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file plant.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_PLANT_H
-#define __SINFG_PLANT_H
+#ifndef __SYNFIG_PLANT_H
+#define __SYNFIG_PLANT_H
/* === H E A D E R S ======================================================= */
#include <list>
#include <vector>
-#include <sinfg/layer_composite.h>
-#include <sinfg/segment.h>
-#include <sinfg/blinepoint.h>
-#include <sinfg/value.h>
-#include <sinfg/gradient.h>
-#include <sinfg/angle.h>
+#include <synfig/layer_composite.h>
+#include <synfig/segment.h>
+#include <synfig/blinepoint.h>
+#include <synfig/value.h>
+#include <synfig/gradient.h>
+#include <synfig/angle.h>
#include "random.h"
-#include <sinfg/rect.h>
+#include <synfig/rect.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
-class Plant : public sinfg::Layer_Composite
+class Plant : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
- std::vector<sinfg::BLinePoint> bline;
+ std::vector<synfig::BLinePoint> bline;
bool bline_loop;
- sinfg::Gradient gradient;
+ synfig::Gradient gradient;
struct Particle
{
- sinfg::Point point;
- sinfg::Color color;
+ synfig::Point point;
+ synfig::Color color;
- Particle(const sinfg::Point &point,const sinfg::Color& color):
+ Particle(const synfig::Point &point,const synfig::Color& color):
point(point),color(color) { }
};
mutable std::vector<Particle> particle_list;
- mutable sinfg::Rect bounding_rect;
- sinfg::Angle split_angle;
- sinfg::Vector gravity;
- sinfg::Real velocity;
- sinfg::Real step;
- sinfg::Real mass;
- sinfg::Real drag;
- sinfg::Real size;
+ mutable synfig::Rect bounding_rect;
+ synfig::Angle split_angle;
+ synfig::Vector gravity;
+ synfig::Real velocity;
+ synfig::Real step;
+ synfig::Real mass;
+ synfig::Real drag;
+ synfig::Real size;
int splits;
int sprouts;
- sinfg::Real random_factor;
+ synfig::Real random_factor;
Random random;
bool size_as_alpha;
mutable bool needs_sync_;
- void branch(int n, int depth,float t, float stunt_growth, sinfg::Point position,sinfg::Vector velocity)const;
+ void branch(int n, int depth,float t, float stunt_growth, synfig::Point position,synfig::Vector velocity)const;
public:
void calc_bounding_rect()const;
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Vocab get_param_vocab()const;
- virtual bool accelerated_render(sinfg::Context context,sinfg::Surface *surface,int quality, const sinfg::RendDesc &renddesc, sinfg::ProgressCallback *cb)const;\
+ virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;\
- virtual sinfg::Rect get_bounding_rect(sinfg::Context context)const;
+ virtual synfig::Rect get_bounding_rect(synfig::Context context)const;
};
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file noise.cpp
** \brief blehh
**
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file noise.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_RANDOM_H
-#define __SINFG_RANDOM_H
+#ifndef __SYNFIG_RANDOM_H
+#define __SYNFIG_RANDOM_H
/* === H E A D E R S ======================================================= */
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_png/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_png/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_png.la
libmod_png_la_SOURCES = main.cpp trgt_png.cpp trgt_png.h mptr_png.cpp mptr_png.h
libmod_png_la_LDFLAGS = -module @PNG_LIBS@ -no-undefined
-libmod_png_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_png_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_png_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_png_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
else
endif
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "trgt_png.h"
#include "mptr_png.h"
#endif
MODULE_DESCRIPTION("Provides a PNG target and importer")
MODULE_AUTHOR("Robert B. Quattlebaum Jr")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mod_png)
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: mptr_png.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
#endif
#include "mptr_png.h"
-#include <sinfg/importer.h>
-#include <sinfg/time.h>
-#include <sinfg/general.h>
+#include <synfig/importer.h>
+#include <synfig/time.h>
+#include <synfig/general.h>
#include <cstdio>
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_IMPORTER_INIT(png_mptr);
-SINFG_IMPORTER_SET_NAME(png_mptr,"png_mptr");
-SINFG_IMPORTER_SET_EXT(png_mptr,"png");
-SINFG_IMPORTER_SET_VERSION(png_mptr,"0.1");
-SINFG_IMPORTER_SET_CVS_ID(png_mptr,"$Id: mptr_png.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_IMPORTER_INIT(png_mptr);
+SYNFIG_IMPORTER_SET_NAME(png_mptr,"png_mptr");
+SYNFIG_IMPORTER_SET_EXT(png_mptr,"png");
+SYNFIG_IMPORTER_SET_VERSION(png_mptr,"0.1");
+SYNFIG_IMPORTER_SET_CVS_ID(png_mptr,"$Id: mptr_png.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === M E T H O D S ======================================================= */
png_mptr::png_out_error(png_struct *png_data,const char *msg)
{
//png_mptr *me=(png_mptr*)png_data->error_ptr;
- sinfg::error(strprintf("png_mptr: error: %s",msg));
+ synfig::error(strprintf("png_mptr: error: %s",msg));
//me->ready=false;
}
png_mptr::png_out_warning(png_struct *png_data,const char *msg)
{
//png_mptr *me=(png_mptr*)png_data->error_ptr;
- sinfg::warning(strprintf("png_mptr: warning: %s",msg));
+ synfig::warning(strprintf("png_mptr: warning: %s",msg));
//me->ready=false;
}
double fgamma;
if (png_get_gAMA(png_ptr, info_ptr, &fgamma))
{
- sinfg::info("PNG: Image gamma is %f",fgamma);
+ synfig::info("PNG: Image gamma is %f",fgamma);
png_set_gamma(png_ptr, gamma().get_gamma(), fgamma);
}
/*
if (setjmp(png_jmpbuf(png_ptr)))
{
- sinfg::error("Unable to setup longjump");
+ synfig::error("Unable to setup longjump");
png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
fclose(file);
//! \todo THROW SOMETHING
break;
case PNG_COLOR_TYPE_PALETTE:
- sinfg::warning("png_mptr: Paletted PNGs aren't yet fully supported.");
+ synfig::warning("png_mptr: Paletted PNGs aren't yet fully supported.");
for(y=0;y<surface_buffer.get_h();y++)
for(x=0;x<surface_buffer.get_w();x++)
{
}
break;
default:
- sinfg::error("png_mptr: error: Unsupported color type");
+ synfig::error("png_mptr: error: Unsupported color type");
//! \todo THROW SOMETHING
throw String("error on importer construction, *WRITEME*6");
return;
}
bool
-png_mptr::get_frame(sinfg::Surface &surface,Time, sinfg::ProgressCallback *cb)
+png_mptr::get_frame(synfig::Surface &surface,Time, synfig::ProgressCallback *cb)
{
surface.mirror(surface_buffer);
// surface=surface_buffer;
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: mptr_png.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MPTR_PNG_H
-#define __SINFG_MPTR_PNG_H
+#ifndef __SYNFIG_MPTR_PNG_H
+#define __SYNFIG_MPTR_PNG_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/importer.h>
-#include <sinfg/string.h>
-#include <sinfg/surface.h>
+#include <synfig/importer.h>
+#include <synfig/string.h>
+#include <synfig/surface.h>
#include <png.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class png_mptr : public sinfg::Importer
+class png_mptr : public synfig::Importer
{
- SINFG_IMPORTER_MODULE_EXT
+ SYNFIG_IMPORTER_MODULE_EXT
private:
- sinfg::String filename;
- sinfg::Surface surface_buffer;
+ synfig::String filename;
+ synfig::Surface surface_buffer;
png_structp png_ptr;
png_infop info_ptr;
png_mptr(const char *filename);
~png_mptr();
- virtual bool get_frame(sinfg::Surface &,sinfg::Time, sinfg::ProgressCallback *);
+ virtual bool get_frame(synfig::Surface &,synfig::Time, synfig::ProgressCallback *);
};
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** png_trgt Target Module
** $Id: trgt_png.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_TARGET
+#define SYNFIG_TARGET
#ifdef USING_PCH
# include "pch.h"
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_TARGET_INIT(png_trgt);
-SINFG_TARGET_SET_NAME(png_trgt,"png");
-SINFG_TARGET_SET_EXT(png_trgt,"png");
-SINFG_TARGET_SET_VERSION(png_trgt,"0.1");
-SINFG_TARGET_SET_CVS_ID(png_trgt,"$Id: trgt_png.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_TARGET_INIT(png_trgt);
+SYNFIG_TARGET_SET_NAME(png_trgt,"png");
+SYNFIG_TARGET_SET_EXT(png_trgt,"png");
+SYNFIG_TARGET_SET_VERSION(png_trgt,"0.1");
+SYNFIG_TARGET_SET_CVS_ID(png_trgt,"$Id: trgt_png.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === M E T H O D S ======================================================= */
png_trgt::png_out_error(png_struct *png_data,const char *msg)
{
png_trgt *me=(png_trgt*)png_data->error_ptr;
- sinfg::error(strprintf("png_trgt: error: %s",msg));
+ synfig::error(strprintf("png_trgt: error: %s",msg));
me->ready=false;
}
png_trgt::png_out_warning(png_struct *png_data,const char *msg)
{
png_trgt *me=(png_trgt*)png_data->error_ptr;
- sinfg::warning(strprintf("png_trgt: warning: %s",msg));
+ synfig::warning(strprintf("png_trgt: warning: %s",msg));
me->ready=false;
}
}
bool
-png_trgt::start_frame(sinfg::ProgressCallback *callback)
+png_trgt::start_frame(synfig::ProgressCallback *callback)
{
int w=desc.get_w(),h=desc.get_h();
png_ptr=png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)this,png_out_error, png_out_warning);
if (!png_ptr)
{
- sinfg::error("Unable to setup PNG struct");
+ synfig::error("Unable to setup PNG struct");
fclose(file);
return false;
}
info_ptr= png_create_info_struct(png_ptr);
if (!info_ptr)
{
- sinfg::error("Unable to setup PNG info struct");
+ synfig::error("Unable to setup PNG info struct");
fclose(file);
png_destroy_write_struct(&png_ptr,(png_infopp)NULL);
return false;
if (setjmp(png_jmpbuf(png_ptr)))
{
- sinfg::error("Unable to setup longjump");
+ synfig::error("Unable to setup longjump");
png_destroy_write_struct(&png_ptr, &info_ptr);
fclose(file);
return false;
{ PNG_TEXT_COMPRESSION_NONE, "Title", const_cast<char *>(get_canvas()->get_name().c_str()) },
{ PNG_TEXT_COMPRESSION_NONE, "Description", const_cast<char *>(get_canvas()->get_description().c_str()) },
{ PNG_TEXT_COMPRESSION_NONE, "Copyright", "(c) 2004 Voria Studios, LLC" },
- { PNG_TEXT_COMPRESSION_NONE, "Software", "SINFG" },
+ { PNG_TEXT_COMPRESSION_NONE, "Software", "SYNFIG" },
};
png_set_text(png_ptr,info_ptr,comments,sizeof(comments)/sizeof(png_text));
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: trgt_png.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_PNG_H
-#define __SINFG_TRGT_PNG_H
+#ifndef __SYNFIG_TRGT_PNG_H
+#define __SYNFIG_TRGT_PNG_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
#include <cstdio>
#include <png.h>
/* === C L A S S E S & S T R U C T S ======================================= */
-class png_trgt : public sinfg::Target_Scanline
+class png_trgt : public synfig::Target_Scanline
{
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
private:
FILE *file;
int w,h;
static void png_out_warning(png_struct *png,const char *msg);
bool multi_image,ready;
int imagecount;
- sinfg::String filename;
+ synfig::String filename;
unsigned char *buffer;
- sinfg::Color *color_buffer;
+ synfig::Color *color_buffer;
public:
png_trgt(const char *filename);
virtual ~png_trgt();
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
- virtual sinfg::Color * start_scanline(int scanline);
+ virtual synfig::Color * start_scanline(int scanline);
virtual bool end_scanline();
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_ppm/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_ppm/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_ppm.la
libmod_ppm_la_SOURCES = main.cpp trgt_ppm.cpp trgt_ppm.h mptr_ppm.cpp mptr_ppm.h # trgt_mpg.cpp trgt_mpg.h
libmod_ppm_la_LDFLAGS = -module -no-undefined
-libmod_ppm_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_ppm_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_ppm_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_ppm_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "trgt_ppm.h"
#include "mptr_ppm.h"
#endif
MODULE_DESCRIPTION("Provides a PPM target")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mod_ppm)
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: mptr_ppm.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
#endif
#include "mptr_ppm.h"
-#include <sinfg/importer.h>
-#include <sinfg/time.h>
-#include <sinfg/surface.h>
-#include <sinfg/general.h>
-#include <sinfg/smartfile.h>
+#include <synfig/importer.h>
+#include <synfig/time.h>
+#include <synfig/surface.h>
+#include <synfig/general.h>
+#include <synfig/smartfile.h>
#include <cstdio>
#include <algorithm>
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_IMPORTER_INIT(ppm_mptr);
-SINFG_IMPORTER_SET_NAME(ppm_mptr,"ppm_mptr");
-SINFG_IMPORTER_SET_EXT(ppm_mptr,"ppm");
-SINFG_IMPORTER_SET_VERSION(ppm_mptr,"0.1");
-SINFG_IMPORTER_SET_CVS_ID(ppm_mptr,"$Id: mptr_ppm.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_IMPORTER_INIT(ppm_mptr);
+SYNFIG_IMPORTER_SET_NAME(ppm_mptr,"ppm_mptr");
+SYNFIG_IMPORTER_SET_EXT(ppm_mptr,"ppm");
+SYNFIG_IMPORTER_SET_VERSION(ppm_mptr,"0.1");
+SYNFIG_IMPORTER_SET_CVS_ID(ppm_mptr,"$Id: mptr_ppm.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-ppm_mptr::get_frame(sinfg::Surface &surface,Time, sinfg::ProgressCallback *cb)
+ppm_mptr::get_frame(synfig::Surface &surface,Time, synfig::ProgressCallback *cb)
{
SmartFILE file(fopen(filename.c_str(),"rb"));
if(!file)
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: mptr_ppm.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MPTR_PPM_H
-#define __SINFG_MPTR_PPM_H
+#ifndef __SYNFIG_MPTR_PPM_H
+#define __SYNFIG_MPTR_PPM_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/importer.h>
-#include <sinfg/string.h>
+#include <synfig/importer.h>
+#include <synfig/string.h>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class ppm_mptr : public sinfg::Importer
+class ppm_mptr : public synfig::Importer
{
- SINFG_IMPORTER_MODULE_EXT
+ SYNFIG_IMPORTER_MODULE_EXT
private:
- sinfg::String filename;
+ synfig::String filename;
public:
ppm_mptr(const char *filename);
~ppm_mptr();
- virtual bool get_frame(sinfg::Surface &,sinfg::Time, sinfg::ProgressCallback *);
+ virtual bool get_frame(synfig::Surface &,synfig::Time, synfig::ProgressCallback *);
}; // END of class ppm_mptr
/* === E N D =============================================================== */
/*! ========================================================================
-** Sinfg
+** Synfig
** bsd_mpeg1 Target Module
** $Id: trgt_mpg.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_TARGET
+#define SYNFIG_TARGET
#ifdef USING_PCH
# include "pch.h"
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
}
bool
-bsd_mpeg1::start_frame(sinfg::ProgressCallback *callback)
+bsd_mpeg1::start_frame(synfig::ProgressCallback *callback)
{
return passthru->start_frame(callback);
}
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: trgt_mpg.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_MPG_H
-#define __SINFG_TRGT_MPG_H
+#ifndef __SYNFIG_TRGT_MPG_H
+#define __SYNFIG_TRGT_MPG_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/sinfg.h>
+#include <synfig/synfig.h>
#include <stdio.h>
#include "trgt_ppm.h"
/* === C L A S S E S & S T R U C T S ======================================= */
-class bsd_mpeg1 : public sinfg::Target
+class bsd_mpeg1 : public synfig::Target
{
public:
private:
-// sinfg::RendDesc desc;
- sinfg::Target *passthru;
+// synfig::RendDesc desc;
+ synfig::Target *passthru;
String filename;
FILE *paramfile;
public:
bsd_mpeg1(const char *filename);
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
virtual ~bsd_mpeg1();
virtual unsigned char * start_scanline(int scanline);
virtual bool end_scanline(void);
- static sinfg::Target *New(const char *filename);
+ static synfig::Target *New(const char *filename);
static const char Name[];
static const char Ext[];
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: trgt_ppm.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_TARGET
+#define SYNFIG_TARGET
#ifdef USING_PCH
# include "pch.h"
#endif
#include "trgt_ppm.h"
-#include <sinfg/sinfg.h>
+#include <synfig/synfig.h>
#include <ETL/stringf>
#include <cstdio>
#include <algorithm>
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_TARGET_INIT(ppm);
-SINFG_TARGET_SET_NAME(ppm,"ppm");
-SINFG_TARGET_SET_EXT(ppm,"ppm");
-SINFG_TARGET_SET_VERSION(ppm,"0.1");
-SINFG_TARGET_SET_CVS_ID(ppm,"$Id: trgt_ppm.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_TARGET_INIT(ppm);
+SYNFIG_TARGET_SET_NAME(ppm,"ppm");
+SYNFIG_TARGET_SET_EXT(ppm,"ppm");
+SYNFIG_TARGET_SET_VERSION(ppm,"0.1");
+SYNFIG_TARGET_SET_CVS_ID(ppm,"$Id: trgt_ppm.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-ppm::start_frame(sinfg::ProgressCallback *callback)
+ppm::start_frame(synfig::ProgressCallback *callback)
{
int w=desc.get_w(),h=desc.get_h();
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: trgt_ppm.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_PPM_H
-#define __SINFG_TRGT_PPM_H
+#ifndef __SYNFIG_TRGT_PPM_H
+#define __SYNFIG_TRGT_PPM_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
-#include <sinfg/smartfile.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
+#include <synfig/smartfile.h>
#include <cstdio>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class ppm : public sinfg::Target_Scanline
+class ppm : public synfig::Target_Scanline
{
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
private:
int imagecount;
bool multi_image;
- sinfg::SmartFILE file;
- sinfg::String filename;
- sinfg::Color *color_buffer;
+ synfig::SmartFILE file;
+ synfig::String filename;
+ synfig::Color *color_buffer;
unsigned char *buffer;
public:
ppm(const char *filename);
virtual ~ppm();
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
- virtual sinfg::Color * start_scanline(int scanline);
+ virtual synfig::Color * start_scanline(int scanline);
virtual bool end_scanline();
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mod_yuv420p/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mod_yuv420p/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmod_yuv420p.la
libmod_yuv420p_la_SOURCES = main.cpp trgt_yuv.cpp trgt_yuv.h
libmod_yuv420p_la_LDFLAGS = -module -no-undefined
-libmod_yuv420p_la_CXXFLAGS = @SINFG_CFLAGS@
-libmod_yuv420p_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmod_yuv420p_la_CXXFLAGS = @SYNFIG_CFLAGS@
+libmod_yuv420p_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "trgt_yuv.h"
#endif
MODULE_DESCRIPTION("writeme")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mod_yuv420p)
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file trgt_yuv.cpp
** \brief Template File
**
/* === H E A D E R S ======================================================= */
-#define SINFG_TARGET
+#define SYNFIG_TARGET
#ifdef USING_PCH
# include "pch.h"
#include <functional>
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_TARGET_INIT(yuv);
-SINFG_TARGET_SET_NAME(yuv,"yuv420p");
-SINFG_TARGET_SET_EXT(yuv,"yuv");
-SINFG_TARGET_SET_VERSION(yuv,"0.1");
-SINFG_TARGET_SET_CVS_ID(yuv,"$Id: trgt_yuv.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_TARGET_INIT(yuv);
+SYNFIG_TARGET_SET_NAME(yuv,"yuv420p");
+SYNFIG_TARGET_SET_EXT(yuv,"yuv");
+SYNFIG_TARGET_SET_VERSION(yuv,"0.1");
+SYNFIG_TARGET_SET_CVS_ID(yuv,"$Id: trgt_yuv.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === M E T H O D S ======================================================= */
}
bool
-yuv::start_frame(sinfg::ProgressCallback *callback)
+yuv::start_frame(synfig::ProgressCallback *callback)
{
return static_cast<bool>(file);
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file trgt_yuv.h
** \brief Template File
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRGT_PPM_H
-#define __SINFG_TRGT_PPM_H
+#ifndef __SYNFIG_TRGT_PPM_H
+#define __SYNFIG_TRGT_PPM_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/target_scanline.h>
-#include <sinfg/string.h>
-#include <sinfg/surface.h>
-#include <sinfg/smartfile.h>
+#include <synfig/target_scanline.h>
+#include <synfig/string.h>
+#include <synfig/surface.h>
+#include <synfig/smartfile.h>
#include <cstdio>
/* === M A C R O S ========================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-class yuv : public sinfg::Target_Scanline
+class yuv : public synfig::Target_Scanline
{
- SINFG_TARGET_MODULE_EXT
+ SYNFIG_TARGET_MODULE_EXT
private:
- sinfg::String filename;
- sinfg::SmartFILE file;
- sinfg::Surface surface;
+ synfig::String filename;
+ synfig::SmartFILE file;
+ synfig::Surface surface;
bool dithering;
yuv(const char *filename);
virtual ~yuv();
- virtual bool set_rend_desc(sinfg::RendDesc *desc);
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool set_rend_desc(synfig::RendDesc *desc);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
- virtual sinfg::Color* start_scanline(int scanline);
+ virtual synfig::Color* start_scanline(int scanline);
virtual bool end_scanline();
};
-# $Header: /opt/voria/cvs/sinfg/src/modules/mptr_mplayer/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/modules/mptr_mplayer/Makefile.am,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
module_LTLIBRARIES = libmptr_mplayer.la
libmptr_mplayer_la_SOURCES = main.cpp mptr_mplayer.cpp mptr_mplayer.h
libmptr_mplayer_la_LDFLAGS = -module -no-undefined
-libmptr_mplayer_la_LIBADD = -L../../sinfg -lsinfg @SINFG_LIBS@
+libmptr_mplayer_la_LIBADD = -L../../synfig -lsynfig @SYNFIG_LIBS@
/*! ========================================================================
-** Sinfg
+** Synfig
** bleh
** $Id: main.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_MODULE
+#define SYNFIG_MODULE
#ifdef USING_PCH
# include "pch.h"
# include <config.h>
#endif
-#include <sinfg/module.h>
+#include <synfig/module.h>
#include "mptr_mplayer.h"
#endif
MODULE_DESCRIPTION("ARGH")
MODULE_AUTHOR("Robert B. Quattlebaum")
MODULE_VERSION("1.0")
- MODULE_COPYRIGHT(SINFG_COPYRIGHT)
+ MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
MODULE_DESC_END
MODULE_INVENTORY_BEGIN(mptr_mplayer)
/*! ========================================================================
-** Sinfg
+** Synfig
** ppm Target Module
** $Id: mptr_mplayer.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
# include <config.h>
#endif
-#include <sinfg/sinfg.h>
+#include <synfig/synfig.h>
#include <ETL/stringf>
#include "mptr_mplayer.h"
#include <stdio.h>
/* === M A C R O S ========================================================= */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
}
bool
-mplayer_mptr::GetFrame(Time time, sinfg::Surface &surface, sinfg::ProgressCallback *)
+mplayer_mptr::GetFrame(Time time, synfig::Surface &surface, synfig::ProgressCallback *)
{
int ret;
ret=system(
- strprintf("/usr/local/bin/mencoder \"%s\" -ovc rawrgb -ss %f -endpos 0 -nosound -o /tmp/tmp.sinfg.rgbdata | grep \"VIDEO\" > /tmp/tmp.sinfg.size",
+ strprintf("/usr/local/bin/mencoder \"%s\" -ovc rawrgb -ss %f -endpos 0 -nosound -o /tmp/tmp.synfig.rgbdata | grep \"VIDEO\" > /tmp/tmp.synfig.size",
filename.c_str(),
time
).c_str()
return false;
}
*/
- FILE *sizefile=fopen("/tmp/tmp.sinfg.size","rt");
- FILE *rgbfile=fopen("/tmp/tmp.sinfg.rgbdata","rb");
+ FILE *sizefile=fopen("/tmp/tmp.synfig.size","rt");
+ FILE *rgbfile=fopen("/tmp/tmp.synfig.rgbdata","rb");
if(!rgbfile)
{
- cerr<<"unable to open /tmp/tmp.sinfg.rgbdata"<<endl;
+ cerr<<"unable to open /tmp/tmp.synfig.rgbdata"<<endl;
return false;
}
if(!sizefile)
{
- cerr<<"unable to open /tmp/tmp.sinfg.size"<<endl;
+ cerr<<"unable to open /tmp/tmp.synfig.size"<<endl;
return false;
}
/*! ========================================================================
-** Sinfg
+** Synfig
** Template Header File
** $Id: mptr_mplayer.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MPTR_MPLAYER_H
-#define __SINFG_MPTR_MPLAYER_H
+#ifndef __SYNFIG_MPTR_MPLAYER_H
+#define __SYNFIG_MPTR_MPLAYER_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/sinfg.h>
+#include <synfig/synfig.h>
#include <stdio.h>
#include "string.h"
/* === C L A S S E S & S T R U C T S ======================================= */
-class mplayer_mptr : public sinfg::Importer
+class mplayer_mptr : public synfig::Importer
{
public:
private:
static const char Name[];
static const char Ext[];
- virtual bool GetFrame(sinfg::Time time, sinfg::Surface &, sinfg::ProgressCallback *);
+ virtual bool GetFrame(synfig::Time time, synfig::Surface &, synfig::ProgressCallback *);
- static sinfg::Importer *New(const char *filename);
+ static synfig::Importer *New(const char *filename);
};
/* === E N D =============================================================== */
-# $Header: /opt/voria/cvs/sinfg/src/sinfg/Makefile.am,v 1.3 2005/01/21 19:29:10 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/synfig/Makefile.am,v 1.3 2005/01/21 19:29:10 darco Exp $
# SUBDIRS=proto
VALUEHEADERS=blinepoint.h gradient.h value.h
VALUESOURCES=blinepoint.cpp gradient.cpp value.cpp
-SINFGHEADERS=surfacenew.h mutex.h timepointcollect.h interpolation.h guidset.h guid.h rect.h node.h smartfile.h distance.h palette.h main.h waypoint.h activepoint.h gamma.h uniqueid.h canvasbase.h context.h real.h paramdesc.h string_decl.h angle.h keyframe.h sinfg.h renddesc.h general.h importer.h surface.h module.h layer.h vector.h color.h canvas.h render.h target.h loadcanvas.h savecanvas.h valuenode.h version.h segment.h types.h exception.h string.h time.h blur.h transform.h curve_helper.h polynomial_root.h curveset.h
-SINFGSOURCES=mutex.cpp timepointcollect.cpp rect.cpp node.cpp guid.cpp loadcanvas.cpp distance.cpp palette.cpp paramdesc.cpp waypoint.cpp activepoint.cpp gamma.cpp uniqueid.cpp context.cpp renddesc.cpp time.cpp exception.cpp keyframe.cpp main.cpp surface.cpp module.cpp importer.cpp layer.cpp color.cpp canvas.cpp render.cpp target.cpp savecanvas.cpp valuenode.cpp blur.cpp curve_helper.cpp polynomial_root.cpp transform.cpp curveset.cpp
+SYNFIGHEADERS=surfacenew.h mutex.h timepointcollect.h interpolation.h guidset.h guid.h rect.h node.h smartfile.h distance.h palette.h main.h waypoint.h activepoint.h gamma.h uniqueid.h canvasbase.h context.h real.h paramdesc.h string_decl.h angle.h keyframe.h synfig.h renddesc.h general.h importer.h surface.h module.h layer.h vector.h color.h canvas.h render.h target.h loadcanvas.h savecanvas.h valuenode.h version.h segment.h types.h exception.h string.h time.h blur.h transform.h curve_helper.h polynomial_root.h curveset.h
+SYNFIGSOURCES=mutex.cpp timepointcollect.cpp rect.cpp node.cpp guid.cpp loadcanvas.cpp distance.cpp palette.cpp paramdesc.cpp waypoint.cpp activepoint.cpp gamma.cpp uniqueid.cpp context.cpp renddesc.cpp time.cpp exception.cpp keyframe.cpp main.cpp surface.cpp module.cpp importer.cpp layer.cpp color.cpp canvas.cpp render.cpp target.cpp savecanvas.cpp valuenode.cpp blur.cpp curve_helper.cpp polynomial_root.cpp transform.cpp curveset.cpp
-lib_LTLIBRARIES = libsinfg.la
-libsinfg_la_SOURCES = $(VALUEHEADERS) $(VALUESOURCES) $(LAYERSOURCES) $(LAYERHEADERS) $(TARGETHEADERS) $(TARGETSOURCES) $(VALUENODEHEADERS) $(VALUENODESOURCES) $(SINFGHEADERS) $(SINFGSOURCES) $(IMPORTERHEADERS) $(IMPORTERSOURCES)
-libsinfg_la_LIBADD = @LIBLTDL@ @SINFG_LIBS@ @LIBADD_DL@
-libsinfg_la_CXXFLAGS = @SINFG_CFLAGS@ -DLIBDIR="\"@libdir@\"" -DSYSCONFDIR="\"@sysconfdir@\""
-libsinfg_la_LDFLAGS = -export-dynamic -no-undefined -version-info 0:0:0
+lib_LTLIBRARIES = libsynfig.la
+libsynfig_la_SOURCES = $(VALUEHEADERS) $(VALUESOURCES) $(LAYERSOURCES) $(LAYERHEADERS) $(TARGETHEADERS) $(TARGETSOURCES) $(VALUENODEHEADERS) $(VALUENODESOURCES) $(SYNFIGHEADERS) $(SYNFIGSOURCES) $(IMPORTERHEADERS) $(IMPORTERSOURCES)
+libsynfig_la_LIBADD = @LIBLTDL@ @SYNFIG_LIBS@ @LIBADD_DL@
+libsynfig_la_CXXFLAGS = @SYNFIG_CFLAGS@ -DLIBDIR="\"@libdir@\"" -DSYSCONFDIR="\"@sysconfdir@\""
+libsynfig_la_LDFLAGS = -export-dynamic -no-undefined -version-info 0:0:0
-include_sinfgdir=@sinfgincludedir@/sinfg
-include_sinfg_HEADERS = $(SINFGHEADERS) $(LAYERHEADERS) $(TARGETHEADERS) $(VALUENODEHEADERS) $(IMPORTERHEADERS) $(VALUEHEADERS)
+include_synfigdir=@synfigincludedir@/synfig
+include_synfig_HEADERS = $(SYNFIGHEADERS) $(LAYERHEADERS) $(TARGETHEADERS) $(VALUENODEHEADERS) $(IMPORTERHEADERS) $(VALUEHEADERS)
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file activepoint.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-sinfg::GUID
+synfig::GUID
Activepoint::get_guid()const
{
return GUID::hasher(get_uid());
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file activepoint.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_ACTIVEPOINT_H
-#define __SINFG_ACTIVEPOINT_H
+#ifndef __SYNFIG_ACTIVEPOINT_H
+#define __SYNFIG_ACTIVEPOINT_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class GUID;
class ValueNode;
GUID get_guid()const;
}; // END of struct ValueNode_BLine::Activepoint
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file angle.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_ANGLE_H
-#define __SINFG_ANGLE_H
+#ifndef __SYNFIG_ANGLE_H
+#define __SYNFIG_ANGLE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \typedef Angle
** \todo writeme
*/
typedef etl::angle Angle;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file blinepoint.cpp
** \brief Template File
**
/* === U S I N G =========================================================== */
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
void
-sinfg::BLinePoint::reverse()
+synfig::BLinePoint::reverse()
{
if(split_tangent_)
{
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file blinepoint.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_BLINEPOINT_H
-#define __SINFG_BLINEPOINT_H
+#ifndef __SYNFIG_BLINEPOINT_H
+#define __SYNFIG_BLINEPOINT_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class BLinePoint : public UniqueID
{
}; // END of class BLinePoint
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file blur.cpp
** \brief Blur Implementation File
**
# include <config.h>
#endif
-#include <sinfg/general.h>
-#include <sinfg/surface.h>
+#include <synfig/general.h>
+#include <synfig/surface.h>
#include "blur.h"
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
return blurpos;
}
-Point Blur::operator ()(sinfg::Real x, sinfg::Real y) const
+Point Blur::operator ()(synfig::Real x, synfig::Real y) const
{
return (*this)(Point(x,y));
}
Surface worksurface(w,h);
- //sinfg::info("Blur: check surface = %s", surface_valid(surface)?"true":"false");
+ //synfig::info("Blur: check surface = %s", surface_valid(surface)?"true":"false");
// Premultiply the alpha
for(y=0;y<h;y++)
case Blur::BOX: // B O X -------------------------------------------------------
{
//horizontal part
- //sinfg::info("Blur: Starting Box blur (surface valid %d)", (int)surface_valid(worksurface));
+ //synfig::info("Blur: Starting Box blur (surface valid %d)", (int)surface_valid(worksurface));
Surface temp_surface;
temp_surface.set_wh(w,h);
int length = halfsizex;
length=std::max(1,length);
- //sinfg::info("Blur: hbox blur work -> temp %d", length);
+ //synfig::info("Blur: hbox blur work -> temp %d", length);
etl::hbox_blur(worksurface.begin(),worksurface.end(),length,temp_surface.begin());
}
else temp_surface = worksurface;
- //sinfg::info("Blur: hbox finished");
+ //synfig::info("Blur: hbox finished");
//vertical part
//Surface temp_surface2;
int length = halfsizey;
length = std::max(1,length);
- //sinfg::info("Blur: vbox blur temp -> work %d",length);
+ //synfig::info("Blur: vbox blur temp -> work %d",length);
etl::vbox_blur(temp_surface.begin(),temp_surface.end(),length,worksurface.begin());
}
else worksurface = temp_surface;
- //sinfg::info("Blur: vbox finished");
+ //synfig::info("Blur: vbox finished");
//blend with the original surface
/*int x,y;
Surface temp_surface;
Surface *gauss_surface;
- //sinfg::warning("Didn't crash yet b1");
+ //synfig::warning("Didn't crash yet b1");
//if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT)
gauss_surface = &worksurface;
memset(SC0,0,(w+2)*sizeof(Color));
memset(SC0,0,(w+2)*sizeof(Color));
- //sinfg::warning("Didn't crash yet b2");
+ //synfig::warning("Didn't crash yet b2");
//int i = 0;
while(bw&&bh)
bw--,bh--;
}
- //sinfg::warning("Didn't crash yet bi - %d",i++);
+ //synfig::warning("Didn't crash yet bi - %d",i++);
}
while(bw)
{
GuassianBlur_2x1(*gauss_surface);
bw--;
}
- //sinfg::warning("Didn't crash yet bi - %d",i++);
+ //synfig::warning("Didn't crash yet bi - %d",i++);
}
while(bh)
{
GuassianBlur_1x2(*gauss_surface);
bh--;
}
- //sinfg::warning("Didn't crash yet bi - %d",i++);
+ //synfig::warning("Didn't crash yet bi - %d",i++);
}
delete [] SC0;
for(x=0;x<renddesc.get_w();x++)
worksurface[y][x]=Color::blend(temp_surface[y][x],worksurface[y][x],get_amount(),get_blend_method());
}*/
- //sinfg::warning("Didn't crash yet b end",i++);
+ //synfig::warning("Didn't crash yet b end",i++);
}
break;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file blur.h
** \brief Blur Helper Header file
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_BLUR_HELPER_H
-#define __SINFG_BLUR_HELPER_H
+#ifndef __SYNFIG_BLUR_HELPER_H
+#define __SYNFIG_BLUR_HELPER_H
/* === H E A D E R S ======================================================= */
-#include <sinfg/surface.h>
-#include <sinfg/color.h>
-#include <sinfg/vector.h>
+#include <synfig/surface.h>
+#include <synfig/color.h>
+#include <synfig/vector.h>
/* === M A C R O S ========================================================= */
/* === T Y P E D E F S ===================================================== */
/* === C L A S S E S & S T R U C T S ======================================= */
-class sinfg::ProgressCallback;
+class synfig::ProgressCallback;
class Blur
{
};
private:
- sinfg::Point size;
+ synfig::Point size;
int type;
- sinfg::ProgressCallback *cb;
+ synfig::ProgressCallback *cb;
public:
- sinfg::Point & set_size(const sinfg::Point &v) { return (size = v); }
- const sinfg::Point & get_size() const { return size; }
- sinfg::Point & get_size() { return size; }
+ synfig::Point & set_size(const synfig::Point &v) { return (size = v); }
+ const synfig::Point & get_size() const { return size; }
+ synfig::Point & get_size() { return size; }
int & set_type(const int &t) { return (type = t); }
const int & get_type() const { return type; }
int & get_type() { return type; }
Blur() {}
- Blur(const sinfg::Point &s, int t, sinfg::ProgressCallback *callb=0):size(s), type(t), cb(callb) {}
- Blur(sinfg::Real sx, sinfg::Real sy, int t, sinfg::ProgressCallback *callb = 0): size(sx,sy), type(t), cb(callb) {}
+ Blur(const synfig::Point &s, int t, synfig::ProgressCallback *callb=0):size(s), type(t), cb(callb) {}
+ Blur(synfig::Real sx, synfig::Real sy, int t, synfig::ProgressCallback *callb = 0): size(sx,sy), type(t), cb(callb) {}
//Parametric Blur
- sinfg::Point operator ()(const sinfg::Point &p) const;
- sinfg::Point operator ()(sinfg::Real x, sinfg::Real y) const;
+ synfig::Point operator ()(const synfig::Point &p) const;
+ synfig::Point operator ()(synfig::Real x, synfig::Real y) const;
//Surface based blur
// input surface can be the same as output surface,
// though both have to be the same size
- bool operator ()(const sinfg::Surface &surface, const sinfg::Vector &resolution, sinfg::Surface &out) const;
+ bool operator ()(const synfig::Surface &surface, const synfig::Vector &resolution, synfig::Surface &out) const;
- bool operator ()(const etl::surface<float> &surface, const sinfg::Vector &resolution, etl::surface<float> &out) const;
- //bool operator ()(const etl::surface<unsigned char> &surface, const sinfg::Vector &resolution, etl::surface<unsigned char> &out) const;
+ bool operator ()(const etl::surface<float> &surface, const synfig::Vector &resolution, etl::surface<float> &out) const;
+ //bool operator ()(const etl::surface<unsigned char> &surface, const synfig::Vector &resolution, etl::surface<unsigned char> &out) const;
};
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file canvas.cpp
** \brief Canvas Class Member Definitions
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace etl;
using namespace std;
-namespace sinfg { extern Canvas::Handle open_canvas(const String &filename); };
+namespace synfig { extern Canvas::Handle open_canvas(const String &filename); };
/* === M A C R O S ========================================================= */
~_CanvasCounter()
{
if(counter)
- sinfg::error("%d canvases not yet deleted!",counter);
+ synfig::error("%d canvases not yet deleted!",counter);
}
} _canvas_counter;
while(!empty())
{
Layer::Handle layer(front());
- //if(layer->count()>2)sinfg::info("before layer->count()=%d",layer->count());
+ //if(layer->count()>2)synfig::info("before layer->count()=%d",layer->count());
erase(begin());
- //if(layer->count()>1)sinfg::info("after layer->count()=%d",layer->count());
+ //if(layer->count()>1)synfig::info("after layer->count()=%d",layer->count());
}
//CanvasBase::clear();
#if 0
if(is_root())
{
- sinfg::info("is_dirty_=%d",is_dirty_);
- sinfg::info("get_time()=%f",(float)get_time());
- sinfg::info("t=%f",(float)t);
+ synfig::info("is_dirty_=%d",is_dirty_);
+ synfig::info("get_time()=%f",(float)get_time());
+ synfig::info("t=%f",(float)t);
}
#endif
Canvas::LooseHandle
Canvas::get_root()const
{
- return parent_?parent_->get_root().get():const_cast<sinfg::Canvas *>(this);
+ return parent_?parent_->get_root().get():const_cast<synfig::Canvas *>(this);
}
int
String value_node_id(id,id.rfind(':')+1);
if(canvas_id.empty())
canvas_id=':';
- //sinfg::warning("constfind:value_node_id: "+value_node_id);
- //sinfg::warning("constfind:canvas_id: "+canvas_id);
+ //synfig::warning("constfind:value_node_id: "+value_node_id);
+ //synfig::warning("constfind:canvas_id: "+canvas_id);
return find_canvas(canvas_id)->value_node_list_.find(value_node_id);
}
if(!value_node_list_.add(x))
{
- sinfg::error("Unable to add ValueNode");
+ synfig::error("Unable to add ValueNode");
throw std::runtime_error("Unable to add ValueNode");
}
//DEBUGPOINT();
return *iter;
// Create a new canvas and return it
- //sinfg::warning("Implicitly creating canvas named "+id);
+ //synfig::warning("Implicitly creating canvas named "+id);
return new_child_canvas(id);
}
// DEBUGPOINT();
// int i(x->count());
insert(end(),x);
- //if(x->count()!=i+1)sinfg::info("push_back before %d, after %d",i,x->count());
+ //if(x->count()!=i+1)synfig::info("push_back before %d, after %d",i,x->count());
}
void
// DEBUGPOINT();
// int i(x->count());
insert(begin(),x);
- //if(x->count()!=i+1)sinfg::error("push_front before %d, after %d",i,x->count());
+ //if(x->count()!=i+1)synfig::error("push_front before %d, after %d",i,x->count());
}
void
/*if(x->count()!=i+1)
{
- sinfg::error(__FILE__":%d: Canvas::insert(): ***FAILURE*** before %d, after %d",__LINE__,i,x->count());
+ synfig::error(__FILE__":%d: Canvas::insert(): ***FAILURE*** before %d, after %d",__LINE__,i,x->count());
return;
//throw runtime_error("Canvas Insertion Failed");
}*/
Canvas::Handle
Canvas::clone(const GUID& deriv_guid)const
{
- sinfg::String name;
+ synfig::String name;
if(is_inline())
name="inline";
else
canvas->push_back(layer);
if(!(layer.count()>1))
{
- sinfg::error("Canvas::clone(): Cloned layer insertion failure!");
- sinfg::error("Canvas::clone(): \tlayer.count()=%d",layer.count());
- sinfg::error("Canvas::clone(): \tlayer->get_name()=%s",layer->get_name().c_str());
- sinfg::error("Canvas::clone(): \tbefore size()=%d",presize);
- sinfg::error("Canvas::clone(): \tafter size()=%d",size());
+ synfig::error("Canvas::clone(): Cloned layer insertion failure!");
+ synfig::error("Canvas::clone(): \tlayer.count()=%d",layer.count());
+ synfig::error("Canvas::clone(): \tlayer->get_name()=%s",layer->get_name().c_str());
+ synfig::error("Canvas::clone(): \tbefore size()=%d",presize);
+ synfig::error("Canvas::clone(): \tafter size()=%d",size());
}
assert(layer.count()>1);
}
else
{
- sinfg::error("Unable to clone layer");
+ synfig::error("Unable to clone layer");
}
}
}
Canvas::Handle
-Canvas::add_child_canvas(Canvas::Handle child_canvas, const sinfg::String& id)
+Canvas::add_child_canvas(Canvas::Handle child_canvas, const synfig::String& id)
{
if(is_inline() && parent_)
return parent_->add_child_canvas(child_canvas,id);
}
void
-sinfg::optimize_layers(Context context, Canvas::Handle op_canvas)
+synfig::optimize_layers(Context context, Canvas::Handle op_canvas)
{
Context iter;
{
Canvas::Handle sub_canvas(Canvas::create_inline(op_canvas));
optimize_layers(paste_canvas->get_sub_canvas()->get_context(),sub_canvas);
-//#define SINFG_OPTIMIZE_PASTE_CANVAS 1
+//#define SYNFIG_OPTIMIZE_PASTE_CANVAS 1
-#ifdef SINFG_OPTIMIZE_PASTE_CANVAS
+#ifdef SYNFIG_OPTIMIZE_PASTE_CANVAS
Canvas::iterator sub_iter;
// Determine if we can just remove the paste canvas
// altogether
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file canvas.h
** \brief Canvas Class Implementation
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_CANVAS_H
-#define __SINFG_CANVAS_H
+#ifndef __SYNFIG_CANVAS_H
+#define __SYNFIG_CANVAS_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Context;
class GUID;
typedef std::list<Handle> Children;
- friend void sinfg::optimize_layers(Context, Canvas::Handle);
+ friend void synfig::optimize_layers(Context, Canvas::Handle);
/*
-- ** -- D A T A -------------------------------------------------------------
//! Group Changed
sigc::signal<void,String> signal_group_changed_;
- sigc::signal<void,String,etl::handle<sinfg::Layer> > signal_group_pair_added_;
- sigc::signal<void,String,etl::handle<sinfg::Layer> > signal_group_pair_removed_;
+ sigc::signal<void,String,etl::handle<synfig::Layer> > signal_group_pair_added_;
+ sigc::signal<void,String,etl::handle<synfig::Layer> > signal_group_pair_removed_;
//! Layers Reordered
sigc::signal<void,int*> signal_layers_reordered_;
public:
- sigc::signal<void,String,etl::handle<sinfg::Layer> >& signal_group_pair_added() { return signal_group_pair_added_; }
- sigc::signal<void,String,etl::handle<sinfg::Layer> >& signal_group_pair_removed() { return signal_group_pair_removed_; }
+ sigc::signal<void,String,etl::handle<synfig::Layer> >& signal_group_pair_added() { return signal_group_pair_added_; }
+ sigc::signal<void,String,etl::handle<synfig::Layer> >& signal_group_pair_removed() { return signal_group_pair_removed_; }
//! Group Added
sigc::signal<void,String>& signal_group_added() { return signal_group_added_; }
void optimize_layers(Context context, Canvas::Handle op_canvas);
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file canvasbase.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_CANVASBASE_H
-#define __SINFG_CANVASBASE_H
+#ifndef __SYNFIG_CANVASBASE_H
+#define __SYNFIG_CANVASBASE_H
/* === H E A D E R S ======================================================= */
/* === T Y P E D E F S ===================================================== */
-namespace sinfg {
+namespace synfig {
class Layer;
typedef std::deque< etl::handle< Layer > > CanvasBase;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file color.h
** \brief Color Class
**
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace etl;
using namespace std;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file color.h
** \brief Color Class Implementation
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_COLOR_H
-#define __SINFG_COLOR_H
+#ifndef __SYNFIG_COLOR_H
+#define __SYNFIG_COLOR_H
/* === H E A D E R S ======================================================= */
-#ifndef SINFG_NO_ANGLE
+#ifndef SYNFIG_NO_ANGLE
# include "angle.h"
#endif
#endif
-namespace sinfg {
+namespace synfig {
#ifdef USE_HALF_TYPE
typedef half ColorReal;
static Color YUV(const float& y, const float& u, const float& v, const value_type& a=1)
{ return Color().set_yuv(y,u,v).set_a(a); }
-#ifndef SINFG_NO_ANGLE
+#ifndef SYNFIG_NO_ANGLE
//! Returns the hue of the chromanance
/*! This is the angle of the U and V components.
** \see set_hue() */
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file template.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-//#define SINFG_PROFILE_LAYERS
-//#define SINFG_DEBUG_LAYERS
+//#define SYNFIG_PROFILE_LAYERS
+//#define SYNFIG_DEBUG_LAYERS
/* === G L O B A L S ======================================================= */
-#ifdef SINFG_PROFILE_LAYERS
+#ifdef SYNFIG_PROFILE_LAYERS
#include <ETL/clock>
static int depth(0);
static std::map<String,float> time_table;
static void
_print_profile_report()
{
- sinfg::info(">>>> Profile Report: (Times are in msecs)");
+ synfig::info(">>>> Profile Report: (Times are in msecs)");
std::map<String,float>::iterator iter;
float total_time(0);
for(iter=time_table.begin();iter!=time_table.end();++iter)
float time(iter->second);
int runs(run_table[layer]);
total_time+=time;
- sinfg::info(" Layer \"%s\",\tExecs: %03d, Avg Time: %05.1f, Total Time: %05.1f",layer.c_str(),runs,time/runs*1000,time*1000);
+ synfig::info(" Layer \"%s\",\tExecs: %03d, Avg Time: %05.1f, Total Time: %05.1f",layer.c_str(),runs,time/runs*1000,time*1000);
}
- sinfg::info("Total Time: %f seconds", total_time);
- sinfg::info("<<<< End of Profile Report");
+ synfig::info("Total Time: %f seconds", total_time);
+ synfig::info("<<<< End of Profile Report");
}
#endif
bool
Context::accelerated_render(Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb) const
{
- #ifdef SINFG_PROFILE_LAYERS
+ #ifdef SYNFIG_PROFILE_LAYERS
String layer_name(curr_layer);
//sum the pre-work done by layer above us... (curr_layer is layer above us...)
// If this layer isn't defined, return alpha
if((context)->empty())
{
-#ifdef SINFG_DEBUG_LAYERS
- sinfg::info("Context::accelerated_render(): Hit end of list");
+#ifdef SYNFIG_DEBUG_LAYERS
+ synfig::info("Context::accelerated_render(): Hit end of list");
#endif
surface->set_wh(renddesc.get_w(),renddesc.get_h());
surface->clear();
- #ifdef SINFG_PROFILE_LAYERS
+ #ifdef SYNFIG_PROFILE_LAYERS
profile_timer.reset();
#endif
return true;
}
-#ifdef SINFG_DEBUG_LAYERS
- sinfg::info("Context::accelerated_render(): Descending into %s",(*context)->get_name().c_str());
+#ifdef SYNFIG_DEBUG_LAYERS
+ synfig::info("Context::accelerated_render(): Descending into %s",(*context)->get_name().c_str());
#endif
try {
RWLock::ReaderLock lock((*context)->get_rw_lock());
- #ifdef SINFG_PROFILE_LAYERS
+ #ifdef SYNFIG_PROFILE_LAYERS
//go down one layer :P
depth++;
}
catch(std::bad_alloc)
{
- sinfg::error("Context::accelerated_render(): Layer \"%s\" threw a bad_alloc exception!",(*context)->get_name().c_str());
+ synfig::error("Context::accelerated_render(): Layer \"%s\" threw a bad_alloc exception!",(*context)->get_name().c_str());
#ifdef _DEBUG
return false;
#else
}
catch(...)
{
- sinfg::error("Context::accelerated_render(): Layer \"%s\" threw an exception, rethrowing...",(*context)->get_name().c_str());
+ synfig::error("Context::accelerated_render(): Layer \"%s\" threw an exception, rethrowing...",(*context)->get_name().c_str());
throw;
}
}
// Set up a wrter lock
RWLock::WriterLock lock((*context)->get_rw_lock());
- //sinfg::info("%s: dirty_time=%f",(*context)->get_name().c_str(),(float)(*context)->dirty_time_);
- //sinfg::info("%s: time=%f",(*context)->get_name().c_str(),(float)time);
+ //synfig::info("%s: dirty_time=%f",(*context)->get_name().c_str(),(float)(*context)->dirty_time_);
+ //synfig::info("%s: time=%f",(*context)->get_name().c_str(),(float)time);
{
Layer::ParamList params;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file context.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_CONTEXT_H
-#define __SINFG_CONTEXT_H
+#ifndef __SYNFIG_CONTEXT_H
+#define __SYNFIG_CONTEXT_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Vector;
typedef Vector Point;
}; // END of class Context
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file curve_helper.cpp
** \brief Curve Helper File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
#define ERR 1e-11
/* === E N T R Y P O I N T ================================================= */
-Real sinfg::find_closest(const etl::bezier<Point> &curve, const Point &point,
+Real synfig::find_closest(const etl::bezier<Point> &curve, const Point &point,
float step, Real *dout, float *tout)
{
#if 0
//Line Intersection
int
-sinfg::intersect(const Point &p1, const Vector &v1, float &t1,
+synfig::intersect(const Point &p1, const Vector &v1, float &t1,
const Point &p2, const Vector &v2, float &t2)
{
/* Parametric intersection:
return (int)(t[0] <= t[3] && t[1] >= t[2]);
}
-int sinfg::intersect(const Rect &r, const Point &p)
+int synfig::intersect(const Rect &r, const Point &p)
{
return (p[1] < r.maxy && p[1] > r.miny) && p[0] > r.minx;
}
return intersect_scurve(l,p) + intersect_scurve(r,p);
}
-int sinfg::intersect(const bezier<Point> &b, const Point &p)
+int synfig::intersect(const bezier<Point> &b, const Point &p)
{
CIntersect::SCurve c(b,0,1);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file curve_helper.h
** \brief Curve Helper Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_CURVE_HELPER_H
-#define __SINFG_CURVE_HELPER_H
+#ifndef __SYNFIG_CURVE_HELPER_H
+#define __SYNFIG_CURVE_HELPER_H
/* === H E A D E R S ======================================================= */
#include <ETL/bezier>
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
//line helper functions
inline Real line_point_distsq(const Point &p1, const Point &p2,
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file curveset.cpp
** \brief Curve Set Implementation File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
b[0] = curve[j].p; b[3] = curve[i].p;
b[1] = b[0] + curve[j].r/3; b[2] = b[3] - curve[i].l/3;
- inter += sinfg::intersect(b,p);
+ inter += synfig::intersect(b,p);
}
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file curveset.h
** \brief Curve Set Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_CURVESET_H
-#define __SINFG_CURVESET_H
+#ifndef __SYNFIG_CURVESET_H
+#define __SYNFIG_CURVESET_H
/* === H E A D E R S ======================================================= */
#include "blinepoint.h"
/* === T Y P E D E F S ===================================================== */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg
+namespace synfig
{
class BLinePoint;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file distance.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-Distance::Distance(const sinfg::String& str)
+Distance::Distance(const synfig::String& str)
{
(*this)=str;
/* int i(0);
float val;
int ret(strscanf(str,"%f%n",&val,&i));
- sinfg::info("Distance::Distance(): ret=%d, val=%f",ret,val);
+ synfig::info("Distance::Distance(): ret=%d, val=%f",ret,val);
if(ret<=0)
{
// Error
- sinfg::error("Distance::Distance(): Bad value \"%s\"",str.c_str());
+ synfig::error("Distance::Distance(): Bad value \"%s\"",str.c_str());
value_=0;
}
else
value_=val;
- sinfg::info("Distance::Distance(): system=\"%s\"",String(str.begin()+i,str.end()).c_str());
+ synfig::info("Distance::Distance(): system=\"%s\"",String(str.begin()+i,str.end()).c_str());
system_=ident_system(String(str.begin()+i,str.end()));
*/
}
Distance&
-Distance::operator=(const sinfg::String& str)
+Distance::operator=(const synfig::String& str)
{
int i(0);
float val;
int ret(strscanf(str,"%f%n",&val,&i));
- sinfg::info("Distance::Distance(): ret=%d, val=%f",ret,val);
+ synfig::info("Distance::Distance(): ret=%d, val=%f",ret,val);
if(ret<=0)
{
// Error
- sinfg::error("Distance::Distance(): Bad value \"%s\"",str.c_str());
+ synfig::error("Distance::Distance(): Bad value \"%s\"",str.c_str());
return *this;
}
else
value_=val;
- sinfg::String sys(str.begin()+i,str.end());
+ synfig::String sys(str.begin()+i,str.end());
if(sys.size())
system_=ident_system(sys);
return *this;
}
-sinfg::String
+synfig::String
Distance::get_string(int digits)const
{
digits=min(9,max(0,digits));
}
Distance::System // (static)
-Distance::ident_system(const sinfg::String& x)
+Distance::ident_system(const synfig::String& x)
{
- sinfg::String str;
+ synfig::String str;
// Make it all upper case, and remove white space
for(unsigned int i=0;i<x.size();i++)if(x[i]!=' ' && x[i]!='\t')str+=toupper(x[i]);
// If it is plural, make it singular
if(str[str.size()-1]=='S')
- str=sinfg::String(str.begin(),str.end()-1);
+ str=synfig::String(str.begin(),str.end()-1);
if(str.empty() || str=="U" || str=="UNIT")
return SYSTEM_UNITS;
if(str=="MM" || str=="MILLIMETER")
return SYSTEM_MILLIMETERS;
- sinfg::warning("Distance::ident_system(): Unknown distance system \"%s\"",x.c_str());
+ synfig::warning("Distance::ident_system(): Unknown distance system \"%s\"",x.c_str());
return SYSTEM_UNITS;
}
-sinfg::String // (static)
+synfig::String // (static)
Distance::system_name(Distance::System system)
{
switch(system)
default: throw BadSystem();
}
- return sinfg::String();
+ return synfig::String();
}
-sinfg::String // (static)
+synfig::String // (static)
Distance::system_local_name(Distance::System system)
{
switch(system)
default: throw BadSystem();
}
- return sinfg::String();
+ return synfig::String();
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file distance.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_DISTANCE_H
-#define __SINFG_DISTANCE_H
+#ifndef __SYNFIG_DISTANCE_H
+#define __SYNFIG_DISTANCE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class RendDesc;
Distance(){ }
Distance(const value_type& value, System system):value_(value),system_(system) { }
- explicit Distance(const sinfg::String& string);
+ explicit Distance(const synfig::String& string);
operator Real()const { return value_; }
Distance& operator=(const Real& rhs) { value_=rhs; return *this; }
- Distance& operator=(const sinfg::String& rhs);
+ Distance& operator=(const synfig::String& rhs);
- sinfg::String get_string(int digits=4)const;
+ synfig::String get_string(int digits=4)const;
const System& get_system()const { return system_; }
Real units(const RendDesc& rend_desc)const;
static Real meters_to_system(Real x, System target_system);
- static System ident_system(const sinfg::String& str);
- static sinfg::String system_name(System system);
- static sinfg::String system_local_name(System system);
+ static System ident_system(const synfig::String& str);
+ static synfig::String system_name(System system);
+ static synfig::String system_local_name(System system);
const Distance& operator+=(const Distance &rhs) { value_+=meters_to_system(rhs.meters(),system_); return *this; }
const Distance& operator-=(const Distance &rhs) { value_-=meters_to_system(rhs.meters(),system_); return *this; }
*/
}; // END of class Distance
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file template.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
std::runtime_error(what)
// std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what))
{
- sinfg::error("EXCEPTION: bad link name: "+what);
+ synfig::error("EXCEPTION: bad link name: "+what);
}
Exception::BadType::BadType(const String &what):
std::runtime_error(what)
// std::runtime_error(_("Bad Type")+what.empty()?"":(String(": ")+what))
{
- sinfg::error("EXCEPTION: bad type: "+what);
+ synfig::error("EXCEPTION: bad type: "+what);
}
Exception::BadFrameRate::BadFrameRate(const String &what):
std::runtime_error(what)
// std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what))
{
- sinfg::error("EXCEPTION: bad frame rate: "+what);
+ synfig::error("EXCEPTION: bad frame rate: "+what);
}
Exception::BadTime::BadTime(const String &what):
std::runtime_error(what)
// std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what))
{
- sinfg::error("EXCEPTION: bad time: "+what);
+ synfig::error("EXCEPTION: bad time: "+what);
}
Exception::NotFound::NotFound(const String &what):
std::runtime_error(what)
// std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what))
{
-// sinfg::error("EXCEPTION: not found: "+what);
+// synfig::error("EXCEPTION: not found: "+what);
}
Exception::IDNotFound::IDNotFound(const String &what):
NotFound(what)
// std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what))
{
-// sinfg::error("EXCEPTION: not found: "+what);
+// synfig::error("EXCEPTION: not found: "+what);
}
Exception::FileNotFound::FileNotFound(const String &what):
NotFound(what)
// std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what))
{
- sinfg::error("EXCEPTION: file not found: "+what);
+ synfig::error("EXCEPTION: file not found: "+what);
}
Exception::IDAlreadyExists::IDAlreadyExists(const String &what):
std::runtime_error(what)
// std::runtime_error(_("ID Already Exists")+what.empty()?"":(String(": ")+what))
{
- sinfg::error("EXCEPTION: id already exists: "+what);
+ synfig::error("EXCEPTION: id already exists: "+what);
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file exception.h
** \brief Exceptions
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_EXCEPTION_H
-#define __SINFG_EXCEPTION_H
+#ifndef __SYNFIG_EXCEPTION_H
+#define __SYNFIG_EXCEPTION_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
namespace Exception {
}; // END of namespace Exception
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file gamma.cpp
** \brief Template File
**
using namespace std;
//using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file gamma.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_GAMMA_H
-#define __SINFG_GAMMA_H
+#ifndef __SYNFIG_GAMMA_H
+#define __SYNFIG_GAMMA_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Gamma
** \brief This class performs color correction on Color classes.
float b_F32_to_F32(float x)const { return static_cast<float>(pow(x,gamma_b)*(1.0f-black_level)+black_level); }
}; // END of class Gamma
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file general.h
** \brief General macros, classes, and prodecure declarations
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_GENERAL_H
-#define __SINFG_GENERAL_H
+#ifndef __SYNFIG_GENERAL_H
+#define __SYNFIG_GENERAL_H
/* === H E A D E R S ======================================================= */
//#define gettext(x) (x)
#endif
-#define SINFG_COPYRIGHT "Copyright (c) 2001-2004 Voria Software, LLC"
+#define SYNFIG_COPYRIGHT "Copyright (c) 2001-2004 Voria Software, LLC"
#ifdef _DEBUG
#ifdef __FUNC__
-#define DEBUGPOINT() sinfg::warning(etl::strprintf(__FILE__":"__FUNC__":%d DEBUGPOINT",__LINE__))
-#define DEBUGINFO(x) sinfg::warning(etl::strprintf(__FILE__":"__FUNC__":%d:DEBUGINFO:",__LINE__)+x)
+#define DEBUGPOINT() synfig::warning(etl::strprintf(__FILE__":"__FUNC__":%d DEBUGPOINT",__LINE__))
+#define DEBUGINFO(x) synfig::warning(etl::strprintf(__FILE__":"__FUNC__":%d:DEBUGINFO:",__LINE__)+x)
#else
-#define DEBUGPOINT() sinfg::warning(etl::strprintf(__FILE__":%d DEBUGPOINT",__LINE__))
-#define DEBUGINFO(x) sinfg::warning(etl::strprintf(__FILE__":%d:DEBUGINFO:",__LINE__)+x)
+#define DEBUGPOINT() synfig::warning(etl::strprintf(__FILE__":%d DEBUGPOINT",__LINE__))
+#define DEBUGINFO(x) synfig::warning(etl::strprintf(__FILE__":%d:DEBUGINFO:",__LINE__)+x)
#endif
#else
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class ProgressCallback
** \todo writeme
extern bool add_to_config_search_path(const std:string &path);
*/
-//! Shutdown the sinfg environment
+//! Shutdown the synfig environment
extern void shutdown();
//! Reports an error
extern void info(const char *format,...);
extern void info(const String &str);
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file gradient.cpp
** \brief Color Gradient Class Member Definitions
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-sinfg::Gradient::Gradient(const Color &c1, const Color &c2)
+synfig::Gradient::Gradient(const Color &c1, const Color &c2)
{
push_back(CPoint(0.0,c1));
push_back(CPoint(1.0,c2));
}
-sinfg::Gradient::Gradient(const Color &c1, const Color &c2, const Color &c3)
+synfig::Gradient::Gradient(const Color &c1, const Color &c2, const Color &c3)
{
push_back(CPoint(0.0,c1));
push_back(CPoint(0.5,c2));
// This algorithm will sort a nearly-sorted list at ~O(N), and
// it will sort an inverse sorted list at ~O(N*N).
void
-sinfg::Gradient::sort()
+synfig::Gradient::sort()
{
stable_sort(begin(),end());
/*
*/
}
-static sinfg::ColorAccumulator
-supersample_helper(const sinfg::Gradient::CPoint &color1, const sinfg::Gradient::CPoint &color2, float begin, float end, float &weight)
+static synfig::ColorAccumulator
+supersample_helper(const synfig::Gradient::CPoint &color1, const synfig::Gradient::CPoint &color2, float begin, float end, float &weight)
{
if(color1.pos==color2.pos || color1.pos>=end || color2.pos<=begin)
{
ret.set_b(ret.get_b()*ret.get_a());
return ret*weight;
}
- sinfg::error("color1.pos=%f",color1.pos);
- sinfg::error("color2.pos=%f",color2.pos);
- sinfg::error("begin=%f",begin);
- sinfg::error("end=%f",end);
+ synfig::error("color1.pos=%f",color1.pos);
+ synfig::error("color2.pos=%f",color2.pos);
+ synfig::error("begin=%f",begin);
+ synfig::error("end=%f",end);
weight=0;
return Color::alpha();
}
Color
-sinfg::Gradient::operator()(const Real &x,float supersample)const
+synfig::Gradient::operator()(const Real &x,float supersample)const
{
if(empty())
return Color(0,0,0,0);
// We should never get to this point.
- sinfg::error("sinfg::Gradient::operator()(): Logic Error (x=%f)",x);
+ synfig::error("synfig::Gradient::operator()(): Logic Error (x=%f)",x);
assert(0);
- throw std::logic_error(strprintf("sinfg::Gradient::operator()(): Logic Error (x=%f)",x));
+ throw std::logic_error(strprintf("synfig::Gradient::operator()(): Logic Error (x=%f)",x));
}
-sinfg::Gradient::iterator
-sinfg::Gradient::proximity(const Real &x)
+synfig::Gradient::iterator
+synfig::Gradient::proximity(const Real &x)
{
iterator iter;
float dist(100000000);
return iter;
}
-sinfg::Gradient::const_iterator
-sinfg::Gradient::proximity(const Real &x)const
+synfig::Gradient::const_iterator
+synfig::Gradient::proximity(const Real &x)const
{
return const_cast<Gradient*>(this)->proximity(x);
/*
*/
}
-sinfg::Gradient::iterator
-sinfg::Gradient::find(const UniqueID &id)
+synfig::Gradient::iterator
+synfig::Gradient::find(const UniqueID &id)
{
iterator iter;
return iter;
}
- throw Exception::NotFound("sinfg::Gradient::find(): Unable to find UniqueID in gradient");
+ throw Exception::NotFound("synfig::Gradient::find(): Unable to find UniqueID in gradient");
}
-sinfg::Gradient::const_iterator
-sinfg::Gradient::find(const UniqueID &id)const
+synfig::Gradient::const_iterator
+synfig::Gradient::find(const UniqueID &id)const
{
const_iterator iter;
return iter;
}
- throw Exception::NotFound("sinfg::Gradient::find()const: Unable to find UniqueID in gradient");
+ throw Exception::NotFound("synfig::Gradient::find()const: Unable to find UniqueID in gradient");
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file gradient.h
** \brief Color Gradient Class
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_GRADIENT_H
-#define __SINFG_GRADIENT_H
+#ifndef __SYNFIG_GRADIENT_H
+#define __SYNFIG_GRADIENT_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \struct GradientCPoint
** \brief \todo
const_iterator find(const UniqueID &id)const;
}; // END of class Gradient
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file guid.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
static void _set_up_rand_long_long(uint64_t &x)
{
#ifdef _DEBUG
- sinfg::info("Starting up GUID system...");
+ synfig::info("Starting up GUID system...");
#endif
_a=GUID_RNG(time(0)+clock());
_b=GUID_RNG(clock());
static void _set_up_rand_long_long(uint64_t &x)
{
#ifdef _DEBUG
- sinfg::info("Starting up GUID system...");
+ synfig::info("Starting up GUID system...");
#endif
rand_fd=open("/dev/urandom",O_RDONLY);
get_rand_long_long=_get_rand_long_long;
void
-sinfg::GUID::make_unique()
+synfig::GUID::make_unique()
{
get_rand_long_long(data.u_64.a);
get_rand_long_long(data.u_64.b);
}
-sinfg::GUID
-sinfg::GUID::hasher(const String& str)
+synfig::GUID
+synfig::GUID::hasher(const String& str)
{
#ifdef HASH_MAP_H
hash<const char*> string_hash_;
return ret;
}
-sinfg::GUID
-sinfg::GUID::hasher(int i)
+synfig::GUID
+synfig::GUID::hasher(int i)
{
GUID ret(0);
GUID_RNG random(i);
}
String
-sinfg::GUID::get_string()const
+synfig::GUID::get_string()const
{
return strprintf("%08X%08X%08X%08X",data.u_32.a,data.u_32.b,data.u_32.c,data.u_32.d);
}
-sinfg::GUID::GUID(const String &str)
+synfig::GUID::GUID(const String &str)
{
strscanf(str,"%08X%08X%08X%08X",&data.u_32.a,&data.u_32.b,&data.u_32.c,&data.u_32.d);
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file guid.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_GUID_H
-#define __SINFG_GUID_H
+#ifndef __SYNFIG_GUID_H
+#define __SYNFIG_GUID_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class GUID
{
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file guidset.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_GUIDSET_H
-#define __SINFG_GUIDSET_H
+#ifndef __SYNFIG_GUIDSET_H
+#define __SYNFIG_GUIDSET_H
#define HASH_SET_H <ext/hash_set>
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class GUIDSet : public
#ifdef HASH_SET_H
-std::set<sinfg::GUID>
+std::set<synfig::GUID>
#else
-std::hash_set<sinfg::GUID,sinfg::GUIDHash>
+std::hash_set<synfig::GUID,synfig::GUIDHash>
#endif
{
}; // END of class GUIDSet
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file importer.cpp
** \brief writeme
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
-Importer::Book* sinfg::Importer::book_;
+Importer::Book* synfig::Importer::book_;
map<String,Importer::LooseHandle> *__open_importers;
{
if(filename.empty())
{
- sinfg::error(_("Importer::open(): Cannot open empty filename"));
+ synfig::error(_("Importer::open(): Cannot open empty filename"));
return 0;
}
// then use it instead.
if(__open_importers->count(filename))
{
- //sinfg::info("Found importer already open, using it...");
+ //synfig::info("Found importer already open, using it...");
return (*__open_importers)[filename];
}
if(find(filename.begin(),filename.end(),'.')==filename.end())
{
- sinfg::error(_("Importer::open(): Couldn't find extension"));
+ synfig::error(_("Importer::open(): Couldn't find extension"));
return 0;
}
if(!Importer::book().count(ext))
{
- sinfg::error(_("Importer::open(): Unknown file type -- ")+ext);
+ synfig::error(_("Importer::open(): Unknown file type -- ")+ext);
return 0;
}
}
catch (String str)
{
- sinfg::error(str);
+ synfig::error(str);
}
return 0;
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file importer.h
** \brief writeme
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_IMPORTER_H
-#define __SINFG_IMPORTER_H
+#ifndef __SYNFIG_IMPORTER_H
+#define __SYNFIG_IMPORTER_H
/* === H E A D E R S ======================================================= */
/* === M A C R O S ========================================================= */
//! \writeme
-#define SINFG_IMPORTER_MODULE_EXT public: static const char name__[], version__[], ext__[],cvs_id__[]; static Importer *create(const char *filename);
+#define SYNFIG_IMPORTER_MODULE_EXT public: static const char name__[], version__[], ext__[],cvs_id__[]; static Importer *create(const char *filename);
//! Sets the name of the importer
-#define SINFG_IMPORTER_SET_NAME(class,x) const char class::name__[]=x
+#define SYNFIG_IMPORTER_SET_NAME(class,x) const char class::name__[]=x
//! \writeme
-#define SINFG_IMPORTER_SET_EXT(class,x) const char class::ext__[]=x
+#define SYNFIG_IMPORTER_SET_EXT(class,x) const char class::ext__[]=x
//! Sets the version of the importer
-#define SINFG_IMPORTER_SET_VERSION(class,x) const char class::version__[]=x
+#define SYNFIG_IMPORTER_SET_VERSION(class,x) const char class::version__[]=x
//! Sets the CVS ID of the importer
-#define SINFG_IMPORTER_SET_CVS_ID(class,x) const char class::cvs_id__[]=x
+#define SYNFIG_IMPORTER_SET_CVS_ID(class,x) const char class::cvs_id__[]=x
//! \writeme
-#define SINFG_IMPORTER_INIT(class) sinfg::Importer* class::create(const char *filename) { return new class(filename); }
+#define SYNFIG_IMPORTER_INIT(class) synfig::Importer* class::create(const char *filename) { return new class(filename); }
/* === T Y P E D E F S ===================================================== */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Surface;
class ProgressCallback;
static Handle open(const String &filename);
};
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file interpolation.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_INTERPOLATION_H
-#define __SINFG_INTERPOLATION_H
+#ifndef __SYNFIG_INTERPOLATION_H
+#define __SYNFIG_INTERPOLATION_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
enum Interpolation
{
INTERPOLATION_NIL
}; // END enum Interpolation
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file keyframe.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
{
const_iterator iter;
int i;
- sinfg::info(">>>>>>>>BEGIN KEYFRAME DUMP");
+ synfig::info(">>>>>>>>BEGIN KEYFRAME DUMP");
for(iter=begin(),i=0;iter!=end();++iter,i++)
{
- sinfg::info("#%d, time: %s, desc: %s",i,iter->get_time().get_string().c_str(),iter->get_description().c_str());
+ synfig::info("#%d, time: %s, desc: %s",i,iter->get_time().get_string().c_str(),iter->get_description().c_str());
}
- sinfg::info("<<<<<<<<END KEYFRAME DUMP");
+ synfig::info("<<<<<<<<END KEYFRAME DUMP");
}
void
KeyframeList::sync()
{
//DEBUGPOINT();
- //sinfg::info("PRE-SORT:");
+ //synfig::info("PRE-SORT:");
//dump();
sort(begin(),end());
- //sinfg::info("POST-SORT:");
+ //synfig::info("POST-SORT:");
//dump();
//DEBUGPOINT();
}
void
KeyframeList::insert_time(const Time& location, const Time& delta)
{
-// sinfg::info("KeyframeList::insert_time(): loc=%s, delta=%s",location.get_string().c_str(),delta.get_string().c_str());
+// synfig::info("KeyframeList::insert_time(): loc=%s, delta=%s",location.get_string().c_str(),delta.get_string().c_str());
if(!delta)
return;
try
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file keyframe.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_KEYFRAME_H
-#define __SINFG_KEYFRAME_H
+#ifndef __SYNFIG_KEYFRAME_H
+#define __SYNFIG_KEYFRAME_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
//! \writeme
class Keyframe : public UniqueID
//typedef std::list<Keyframe> KeyframeList;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer.cpp
** \brief Layer class implementation
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
~_LayerCounter()
{
if(counter)
- sinfg::error("%d layers not yet deleted!",counter);
+ synfig::error("%d layers not yet deleted!",counter);
}
} _layer_counter;
{
_layer_book=new Book();
-#define INCLUDE_LAYER(class) sinfg::Layer::book()[sinfg::String(class::name__)]=BookEntry(class::create,class::name__,class::local_name__,class::category__,class::cvs_id__,class::version__)
-#define LAYER_ALIAS(class,alias) sinfg::Layer::book()[sinfg::String(alias)]=sinfg::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__);
+#define INCLUDE_LAYER(class) synfig::Layer::book()[synfig::String(class::name__)]=BookEntry(class::create,class::name__,class::local_name__,class::category__,class::cvs_id__,class::version__)
+#define LAYER_ALIAS(class,alias) synfig::Layer::book()[synfig::String(alias)]=synfig::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__);
INCLUDE_LAYER(Layer_SolidColor);
INCLUDE_LAYER(Layer_PasteCanvas);
}
Layer::LooseHandle
-sinfg::Layer::create(const String &name)
+synfig::Layer::create(const String &name)
{
if(!book().count(name))
{
return Layer::LooseHandle(layer);
}
-sinfg::Layer::~Layer()
+synfig::Layer::~Layer()
{
_LayerCounter::counter--;
while(!dynamic_param_list_.empty())
}
void
-sinfg::Layer::set_canvas(etl::loose_handle<sinfg::Canvas> x)
+synfig::Layer::set_canvas(etl::loose_handle<synfig::Canvas> x)
{
if(canvas_!=x)
{
*this,
&Layer::set_canvas
),
- etl::loose_handle<sinfg::Canvas>(0)
+ etl::loose_handle<synfig::Canvas>(0)
)
);
}
}
void
-sinfg::Layer::on_canvas_set()
+synfig::Layer::on_canvas_set()
{
}
-etl::loose_handle<sinfg::Canvas>
-sinfg::Layer::get_canvas()const
+etl::loose_handle<synfig::Canvas>
+synfig::Layer::get_canvas()const
{
return canvas_;
}
{
if(!get_canvas())
return -1;
- return get_canvas()->get_depth(const_cast<sinfg::Layer*>(this));
+ return get_canvas()->get_depth(const_cast<synfig::Layer*>(this));
}
void
}
float
-Layer::get_z_depth(const sinfg::Time& t)const
+Layer::get_z_depth(const synfig::Time& t)const
{
if(!dynamic_param_list().count("z_depth"))
return z_depth_;
return context.get_color(pos);
}
-sinfg::Layer::Handle
-Layer::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Layer::hit_check(synfig::Context context, const synfig::Point &pos)const
{
return context.hit_check(pos);
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer.h
** \brief Layer Class Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_H
-#define __SINFG_LAYER_H
+#ifndef __SYNFIG_LAYER_H
+#define __SYNFIG_LAYER_H
/* === H E A D E R S ======================================================= */
/* === M A C R O S ========================================================= */
//! \writeme
-#define SINFG_LAYER_MODULE_EXT public: static const char name__[], version__[], cvs_id__[], local_name__[], category__[]; static Layer *create();
+#define SYNFIG_LAYER_MODULE_EXT public: static const char name__[], version__[], cvs_id__[], local_name__[], category__[]; static Layer *create();
//! Sets the name of the layer
-#define SINFG_LAYER_SET_NAME(class,x) const char class::name__[]=x
+#define SYNFIG_LAYER_SET_NAME(class,x) const char class::name__[]=x
//! Sets the local name of the layer
-#define SINFG_LAYER_SET_LOCAL_NAME(class,x) const char class::local_name__[]=x;
+#define SYNFIG_LAYER_SET_LOCAL_NAME(class,x) const char class::local_name__[]=x;
//! Sets the categpru of the layer
-#define SINFG_LAYER_SET_CATEGORY(class,x) const char class::category__[]=x
+#define SYNFIG_LAYER_SET_CATEGORY(class,x) const char class::category__[]=x
//! Sets the version string for the layer
-#define SINFG_LAYER_SET_VERSION(class,x) const char class::version__[]=x
+#define SYNFIG_LAYER_SET_VERSION(class,x) const char class::version__[]=x
//! Sets the CVS ID string for the layer
-#define SINFG_LAYER_SET_CVS_ID(class,x) const char class::cvs_id__[]=x
+#define SYNFIG_LAYER_SET_CVS_ID(class,x) const char class::cvs_id__[]=x
//! \writeme
-#define SINFG_LAYER_INIT(class) sinfg::Layer* class::create() { return new class(); }
+#define SYNFIG_LAYER_INIT(class) synfig::Layer* class::create() { return new class(); }
//! \writeme
#define IMPORT_PLUS(x,y) if(param==#x && value.same_as(x)) { value.put(&x);{y;}return true;}
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Canvas;
class Vector;
float get_z_depth()const { return z_depth_; }
//! \writeme
- float get_z_depth(const sinfg::Time& t)const;
+ float get_z_depth(const synfig::Time& t)const;
//! \writeme
void set_z_depth(float x) { z_depth_=x; }
}; // END of class Layer
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_bitmap.cpp
** \brief Template Header
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
/* === U S I N G =========================================================== */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === M E T H O D S ======================================================= */
-sinfg::Layer_Bitmap::Layer_Bitmap():
+synfig::Layer_Bitmap::Layer_Bitmap():
Layer_Composite (1.0,Color::BLEND_COMPOSITE),
tl (-0.5,0.5),
br (0.5,-0.5),
}
bool
-sinfg::Layer_Bitmap::set_param(const String & param, ValueBase value)
+synfig::Layer_Bitmap::set_param(const String & param, ValueBase value)
{
IMPORT(tl);
IMPORT(br);
}
ValueBase
-sinfg::Layer_Bitmap::get_param(const String & param)const
+synfig::Layer_Bitmap::get_param(const String & param)const
{
EXPORT(tl);
EXPORT(br);
return ret;
}
-sinfg::Layer::Handle
-Layer_Bitmap::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Layer_Bitmap::hit_check(synfig::Context context, const synfig::Point &pos)const
{
Point surface_pos;
surface_pos=pos-tl;
inline
const Color&
-sinfg::Layer_Bitmap::filter(const Color& c)const
+synfig::Layer_Bitmap::filter(const Color& c)const
{
if(gamma_adjust==1.0)
return c;
}
Color
-sinfg::Layer_Bitmap::get_color(Context context, const Point &pos)const
+synfig::Layer_Bitmap::get_color(Context context, const Point &pos)const
{
Point surface_pos;
//perhaps use a DDA algorithm... if faster...
// will still want pixel fractions to be floating point since colors are
- //sinfg::info("xstart:%d ystart:%d xend:%d yend:%d",x_start,y_start,x_end,y_end);
+ //synfig::info("xstart:%d ystart:%d xend:%d yend:%d",x_start,y_start,x_end,y_end);
//start drawing at the start of the bitmap (either origin or corner of input...)
//and get other info
if(indx > 1.7 || indy > 1.7)
{
- /*sinfg::info("Decided to downsample? ratios - (%f,%f) -> (%d,%d)",
+ /*synfig::info("Decided to downsample? ratios - (%f,%f) -> (%d,%d)",
indx, indy, multw, multh); */
//use sample rect here...
}
//Color c = (*out_surface)[0][0];
- //sinfg::info("ValueBase of first pixel = (%f,%f,%f,%f)",c.get_r(),c.get_g(),c.get_b(),c.get_a());
+ //synfig::info("ValueBase of first pixel = (%f,%f,%f,%f)",c.get_r(),c.get_g(),c.get_b(),c.get_a());
return true;
}
//perform normal interpolation
if(interp==0)
{
- //sinfg::info("Decided to do nearest neighbor");
+ //synfig::info("Decided to do nearest neighbor");
float iny, inx;
int x,y;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_bitmap.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_BITMAP_H
-#define __SINFG_LAYER_BITMAP_H
+#ifndef __SYNFIG_LAYER_BITMAP_H
+#define __SYNFIG_LAYER_BITMAP_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Layer_Bitmap
** \todo writeme
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &rend_desc, ProgressCallback *callback)const;
- virtual sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
}; // END of class Layer_Bitmap
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_composite.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
surfacelayer->br=renddesc.get_br();
surfacelayer->set_blend_method(Color::BLEND_STRAIGHT);
- image.push_front(const_cast<sinfg::Layer_Composite*>(this));
+ image.push_front(const_cast<synfig::Layer_Composite*>(this));
// Set up a surface target
Target::Handle target(surface_target(surface));
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_composite.h
** \brief Composite Layer Class Implementation
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_COMPOSITE_H
-#define __SINFG_LAYER_COMPOSITE_H
+#ifndef __SYNFIG_LAYER_COMPOSITE_H
+#define __SYNFIG_LAYER_COMPOSITE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Layer_NoDeform {};
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
}; // END of class Layer_Composite
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_mime.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_mime.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_MIME_H
-#define __SINFG_LAYER_MIME_H
+#ifndef __SYNFIG_LAYER_MIME_H
+#define __SYNFIG_LAYER_MIME_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Layer_Mime
** The mime layer is a layer that is used when an unknown
};
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_motionblur.h
** \brief Template Header
**
/* === U S I N G =========================================================== */
-using namespace sinfg;
+using namespace synfig;
using namespace etl;
using namespace std;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_MotionBlur);
-SINFG_LAYER_SET_NAME(Layer_MotionBlur,"MotionBlur");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_MotionBlur,_("Motion Blur"));
-SINFG_LAYER_SET_CATEGORY(Layer_MotionBlur,_("Blurs"));
-SINFG_LAYER_SET_VERSION(Layer_MotionBlur,"0.1");
-SINFG_LAYER_SET_CVS_ID(Layer_MotionBlur,"$Id: layer_motionblur.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_MotionBlur);
+SYNFIG_LAYER_SET_NAME(Layer_MotionBlur,"MotionBlur");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_MotionBlur,_("Motion Blur"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_MotionBlur,_("Blurs"));
+SYNFIG_LAYER_SET_VERSION(Layer_MotionBlur,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Layer_MotionBlur,"$Id: layer_motionblur.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === M E M B E R S ======================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_motionblur.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_MOTIONBLUR_H__
-#define __SINFG_LAYER_MOTIONBLUR_H__
+#ifndef __SYNFIG_LAYER_MOTIONBLUR_H__
+#define __SYNFIG_LAYER_MOTIONBLUR_H__
/* === H E A D E R S ======================================================= */
/* === S T R U C T S & C L A S S E S ======================================= */
-namespace sinfg {
+namespace synfig {
-class Layer_MotionBlur : public sinfg::Layer_Composite
+class Layer_MotionBlur : public synfig::Layer_Composite
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
Layer_MotionBlur();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
}; // END of class Layer_MotionBlur
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_pastecanvas.h
** \brief Template Header
**
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
#define MAX_DEPTH 10
//#ifdef __APPLE__
-//#define SINFG_NO_CLIP
+//#define SYNFIG_NO_CLIP
//#endif
/* === C L A S S E S ======================================================= */
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_PasteCanvas);
-SINFG_LAYER_SET_NAME(Layer_PasteCanvas,"PasteCanvas");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_PasteCanvas,_("Paste Canvas"));
-SINFG_LAYER_SET_CATEGORY(Layer_PasteCanvas,_("Default"));
-SINFG_LAYER_SET_VERSION(Layer_PasteCanvas,"0.1");
-SINFG_LAYER_SET_CVS_ID(Layer_PasteCanvas,"$Id: layer_pastecanvas.cpp,v 1.3 2005/01/24 03:08:18 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_PasteCanvas);
+SYNFIG_LAYER_SET_NAME(Layer_PasteCanvas,"PasteCanvas");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_PasteCanvas,_("Paste Canvas"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_PasteCanvas,_("Default"));
+SYNFIG_LAYER_SET_VERSION(Layer_PasteCanvas,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Layer_PasteCanvas,"$Id: layer_pastecanvas.cpp,v 1.3 2005/01/24 03:08:18 darco Exp $");
/* === M E T H O D S ======================================================= */
}
void
-Layer_PasteCanvas::set_sub_canvas(etl::handle<sinfg::Canvas> x)
+Layer_PasteCanvas::set_sub_canvas(etl::handle<synfig::Canvas> x)
{
if(canvas && !do_not_muck_with_time_)
remove_child(canvas.get());
void
Layer_PasteCanvas::on_canvas_set()
{
- //sinfg::info("before count()=%d",count());
+ //synfig::info("before count()=%d",count());
if(get_canvas() && canvas && canvas->is_inline() && canvas->parent()!=get_canvas())
{
- //sinfg::info("during count()=%d",count());
+ //synfig::info("during count()=%d",count());
canvas->set_inline(get_canvas());
}
- //sinfg::info("after count()=%d",count());
+ //synfig::info("after count()=%d",count());
}
ValueBase
bounds=Rect::zero();
}
-sinfg::Layer::Handle
-Layer_PasteCanvas::hit_check(sinfg::Context context, const sinfg::Point &pos)const
+synfig::Layer::Handle
+Layer_PasteCanvas::hit_check(synfig::Context context, const synfig::Point &pos)const
{
if(depth==MAX_DEPTH)return 0;depth_counter counter(depth);
blend_method=Color::BLEND_STRAIGHT;
}
-#ifndef SINFG_NO_CLIP
+#ifndef SYNFIG_NO_CLIP
{
- //sinfg::info("PasteCanv Clip");
+ //synfig::info("PasteCanv Clip");
Rect area(desc.get_rect()&full_bounding_rect);
Point min(area.get_min());
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_pastecanvas.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_PASTEIMAGE_H
-#define __SINFG_LAYER_PASTEIMAGE_H
+#ifndef __SYNFIG_LAYER_PASTEIMAGE_H
+#define __SYNFIG_LAYER_PASTEIMAGE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Layer_PasteCanvas : public Layer_Composite, public Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
Vector origin;
- etl::loose_handle<sinfg::Canvas> canvas;
+ etl::loose_handle<synfig::Canvas> canvas;
//! Recursion depth counter
mutable int depth;
mutable Time curr_time;
- bool optimize_layers(sinfg::Context context,sinfg::CanvasBase&)const;
+ bool optimize_layers(synfig::Context context,synfig::CanvasBase&)const;
bool do_not_muck_with_time_;
void set_do_not_muck_with_time(bool x=true) { do_not_muck_with_time_=true; }
- etl::handle<sinfg::Canvas> get_sub_canvas()const { return canvas; }
- void set_sub_canvas(etl::handle<sinfg::Canvas> x);
+ etl::handle<synfig::Canvas> get_sub_canvas()const { return canvas; }
+ void set_sub_canvas(etl::handle<synfig::Canvas> x);
Real get_zoom()const { return zoom; }
virtual String get_local_name()const;
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Vocab get_param_vocab()const;
- virtual sinfg::Rect get_bounding_rect()const;
+ virtual synfig::Rect get_bounding_rect()const;
- virtual sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
protected:
virtual void get_times_vfunc(Node::time_set &set) const;
}; // END of class Layer_PasteCanvas
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_polygon.cpp
** \brief Template Header
**
/* === U S I N G =========================================================== */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_Polygon);
-SINFG_LAYER_SET_NAME(Layer_Polygon,"polygon");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_Polygon,_("Polygon"));
-SINFG_LAYER_SET_CATEGORY(Layer_Polygon,_("Geometry"));
-SINFG_LAYER_SET_VERSION(Layer_Polygon,"0.1");
-SINFG_LAYER_SET_CVS_ID(Layer_Polygon,"$Id: layer_polygon.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_Polygon);
+SYNFIG_LAYER_SET_NAME(Layer_Polygon,"polygon");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Polygon,_("Polygon"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_Polygon,_("Geometry"));
+SYNFIG_LAYER_SET_VERSION(Layer_Polygon,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Layer_Polygon,"$Id: layer_polygon.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === C L A S S E S ======================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_polygon.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_POLYGON_H
-#define __SINFG_LAYER_POLYGON_H
+#ifndef __SYNFIG_LAYER_POLYGON_H
+#define __SYNFIG_LAYER_POLYGON_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Layer_Polygon
** \beief writeme
** \todo This layer needs to support multiple polygons */
class Layer_Polygon : public Layer_Shape
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
//! Updates EdgeTable so it will reflect the parameter data
void sync();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
bool render_polyspan(Surface *surface,PolySpan &polyspan)const;
}; // END of Layer_Polygon
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
#endif
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_shape.cpp
** \brief Template Header
**
/* === U S I N G =========================================================== */
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_Shape);
-SINFG_LAYER_SET_NAME(Layer_Shape,"shape");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_Shape,_("Shape"));
-SINFG_LAYER_SET_CATEGORY(Layer_Shape,_("Internal"));
-SINFG_LAYER_SET_VERSION(Layer_Shape,"0.1");
-SINFG_LAYER_SET_CVS_ID(Layer_Shape,"$Id: layer_shape.cpp,v 1.2 2005/01/24 03:08:18 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_Shape);
+SYNFIG_LAYER_SET_NAME(Layer_Shape,"shape");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Shape,_("Shape"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_Shape,_("Internal"));
+SYNFIG_LAYER_SET_VERSION(Layer_Shape,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Layer_Shape,"$Id: layer_shape.cpp,v 1.2 2005/01/24 03:08:18 darco Exp $");
#define EPSILON 1e-12
if(dp == 0)
{
- sinfg::warning("polish_cubicroot: Derivative should not vanish!!!");
+ synfig::warning("polish_cubicroot: Derivative should not vanish!!!");
return t;
}
return ret;
}
-sinfg::Layer::Handle
-Layer_Shape::hit_check(sinfg::Context context, const sinfg::Point &p)const
+synfig::Layer::Handle
+Layer_Shape::hit_check(synfig::Context context, const synfig::Point &p)const
{
Point pos(p-offset);
if(intersect)
{
- sinfg::Layer::Handle tmp;
+ synfig::Layer::Handle tmp;
if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(p)))
return tmp;
if(Color::is_onto(get_blend_method()))
return const_cast<Layer_Shape*>(this);
}else if(get_blend_method() == Color::BLEND_ALPHA_OVER)
{
- sinfg::info("layer_shape::hit_check - we've got alphaover");
+ synfig::info("layer_shape::hit_check - we've got alphaover");
//if there's something in the lower layer then we're set...
if(color.get_a() < 0.1 && get_amount() > .9)
{
- sinfg::info("layer_shape::hit_check - can see through us... so nothing");
+ synfig::info("layer_shape::hit_check - can see through us... so nothing");
return Handle();
}else return context.hit_check(p);
}else
cur_y = yin;
}
}
- } catch(...) { sinfg::error("line_to: cur_x=%f, cur_y=%f, x=%f, y=%f", cur_x, cur_y, x, y); throw; }
+ } catch(...) { synfig::error("line_to: cur_x=%f, cur_y=%f, x=%f, y=%f", cur_x, cur_y, x, y); throw; }
flags |= NotClosed|NotSorted;
}
//we are done
if(cb && !cb->amount_complete(100,100))
{
- sinfg::warning("Layer_Shape: could not set amount complete");
+ synfig::warning("Layer_Shape: could not set amount complete");
return false;
}
return false;
}
- } catch(...) { sinfg::error("Layer_Shape::render_shape()1: Caught an exception after %d loops, rethrowing...", tmp); throw; }
+ } catch(...) { synfig::error("Layer_Shape::render_shape()1: Caught an exception after %d loops, rethrowing...", tmp); throw; }
//transfer all the data - RLE optimized
for(curnum=0; curnum < number;)
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_shape.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_SHAPE_H
-#define __SINFG_LAYER_SHAPE_H
+#ifndef __SYNFIG_LAYER_SHAPE_H
+#define __SYNFIG_LAYER_SHAPE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Layer_Shape
** \beief writeme */
class Layer_Shape : public Layer_Composite, public Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
void close();
void endpath();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Vocab get_param_vocab()const;
virtual Color get_color(Context context, const Point &pos)const;
virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
- virtual sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Rect get_bounding_rect()const;
private:
virtual bool render_shape(etl::surface<float> *surface,int quality,const RendDesc &renddesc, ProgressCallback *cb)const;
}; // END of Layer_Shape
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
#endif
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_solidcolor.cpp
** \brief Template Header
**
using namespace etl;
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Layer_SolidColor);
-SINFG_LAYER_SET_NAME(Layer_SolidColor,"SolidColor");
-SINFG_LAYER_SET_LOCAL_NAME(Layer_SolidColor,_("Solid Color"));
-SINFG_LAYER_SET_CATEGORY(Layer_SolidColor,_("Geometry"));
-SINFG_LAYER_SET_VERSION(Layer_SolidColor,"0.1");
-SINFG_LAYER_SET_CVS_ID(Layer_SolidColor,"$Id: layer_solidcolor.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
+SYNFIG_LAYER_INIT(Layer_SolidColor);
+SYNFIG_LAYER_SET_NAME(Layer_SolidColor,"SolidColor");
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_SolidColor,_("Solid Color"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_SolidColor,_("Geometry"));
+SYNFIG_LAYER_SET_VERSION(Layer_SolidColor,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Layer_SolidColor,"$Id: layer_solidcolor.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $");
/* === P R O C E D U R E S ================================================= */
return ret;
}
-sinfg::Layer::Handle
-Layer_SolidColor::hit_check(sinfg::Context context, const sinfg::Point &point)const
+synfig::Layer::Handle
+Layer_SolidColor::hit_check(synfig::Context context, const synfig::Point &point)const
{
if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5)
return const_cast<Layer_SolidColor*>(this);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file layer_solidcolor.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LAYER_SOLIDCOLOR_H
-#define __SINFG_LAYER_SOLIDCOLOR_H
+#ifndef __SYNFIG_LAYER_SOLIDCOLOR_H
+#define __SYNFIG_LAYER_SOLIDCOLOR_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Layer_SolidColor : public Layer_Composite, public Layer_NoDeform
{
- SINFG_LAYER_MODULE_EXT
+ SYNFIG_LAYER_MODULE_EXT
private:
Layer_SolidColor();
- virtual bool set_param(const String & param, const sinfg::ValueBase &value);
+ virtual bool set_param(const String & param, const synfig::ValueBase &value);
virtual ValueBase get_param(const String & param)const;
virtual Vocab get_param_vocab()const;
- virtual sinfg::Layer::Handle hit_check(sinfg::Context context, const sinfg::Point &point)const;
+ virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
}; // END of class Layer_SolidColor
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file listimporter.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
if(!stream)
{
- sinfg::error("Unable to open "+filename);
+ synfig::error("Unable to open "+filename);
return;
}
String line;
if(line.find(String("FPS "))==0)
{
fps=atof(String(line.begin()+4,line.end()).c_str());
- //sinfg::warning("FPS=%f",fps);
+ //synfig::warning("FPS=%f",fps);
if(!fps)
fps=15;
continue;
if(!filename_list.size())
{
if(cb)cb->error(_("No images in list"));
- else sinfg::error(_("No images in list"));
+ else synfig::error(_("No images in list"));
return false;
}
if(!importer)
{
if(cb)cb->error(_("Unable to open ")+filename_list[frame]);
- else sinfg::error(_("Unable to open ")+filename_list[frame]);
+ else synfig::error(_("Unable to open ")+filename_list[frame]);
return false;
}
if(!importer->get_frame(surface,0,cb))
{
if(cb)cb->error(_("Unable to get frame from ")+filename_list[frame]);
- else sinfg::error(_("Unable to get frame from ")+filename_list[frame]);
+ else synfig::error(_("Unable to get frame from ")+filename_list[frame]);
return false;
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file listimporter.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LISTIMPORTER_H
-#define __SINFG_LISTIMPORTER_H
+#ifndef __SYNFIG_LISTIMPORTER_H
+#define __SYNFIG_LISTIMPORTER_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class ListImporter
** \todo Write more detailed description
static Importer* create(const char *filename);
};
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file loadcanvas.cpp
** \brief writeme
**
/* === U S I N G =========================================================== */
using namespace std;
-using namespace sinfg;
+using namespace synfig;
using namespace etl;
/*
class test_class {
static int bleh;
public:
- test_class() { assert(!bleh); bleh++; sinfg::info("test_class: initi: %d",bleh); }
- ~test_class() { assert(bleh); sinfg::info("test_class: uninit: %d",bleh); bleh--; }
+ test_class() { assert(!bleh); bleh++; synfig::info("test_class: initi: %d",bleh); }
+ ~test_class() { assert(bleh); synfig::info("test_class: uninit: %d",bleh); bleh--; }
};
int test_class::bleh(0);
static std::map<String, Canvas::LooseHandle>* open_canvas_map_(0);
-std::map<sinfg::String, etl::loose_handle<Canvas> >& sinfg::get_open_canvas_map()
+std::map<synfig::String, etl::loose_handle<Canvas> >& synfig::get_open_canvas_map()
{
if(!open_canvas_map_)
open_canvas_map_=new std::map<String, Canvas::LooseHandle>;
static void _canvas_file_name_changed(Canvas *x)
{
- std::map<sinfg::String, etl::loose_handle<Canvas> >::iterator iter;
+ std::map<synfig::String, etl::loose_handle<Canvas> >::iterator iter;
for(iter=get_open_canvas_map().begin();iter!=get_open_canvas_map().end();++iter)
if(iter->second==x)
}
Canvas::Handle
-sinfg::open_canvas(const String &filename)
+synfig::open_canvas(const String &filename)
{
CanvasParser parser;
}
Canvas::Handle
-sinfg::open_canvas_as(const String &filename,const String &as)
+synfig::open_canvas_as(const String &filename,const String &as)
{
CanvasParser parser;
}
Canvas::Handle
-sinfg::string_to_canvas(const String &data)
+synfig::string_to_canvas(const String &data)
{
CanvasParser parser;
CanvasParser::warning(xmlpp::Node *element, const String &text)
{
string str=strprintf("%s:<%s>:%d: warning: ",filename.c_str(),element->get_name().c_str(),element->get_line())+text;
- //sinfg::warning(str);
+ //synfig::warning(str);
cerr<<str<<endl;
total_warnings_++;
if(total_warnings_>=max_warnings_)
if(!allow_errors_)
throw runtime_error(str);
cerr<<str<<endl;
- // sinfg::error(str);
+ // synfig::error(str);
}
void
return color;
}
-sinfg::String
+synfig::String
CanvasParser::parse_string(xmlpp::Element *element,Canvas::Handle canvas)
{
assert(element->get_name()=="string");
if(element->get_children().empty())
{
warning(element, "Undefined value in <string>");
- return sinfg::String();
+ return synfig::String();
}
if(element->get_child_text()->get_content().empty())
{
warning(element, "Content element of <string> appears to be empty");
- return sinfg::String();
+ return synfig::String();
}
return element->get_child_text()->get_content();
if(child->get_attribute("tension"))
{
- sinfg::String str(child->get_attribute("tension")->get_value());
+ synfig::String str(child->get_attribute("tension")->get_value());
waypoint->set_tension(atof(str.c_str()));
}
if(child->get_attribute("temporal-tension"))
{
- sinfg::String str(child->get_attribute("temporal-tension")->get_value());
+ synfig::String str(child->get_attribute("temporal-tension")->get_value());
waypoint->set_time_tension(atof(str.c_str()));
}
if(child->get_attribute("continuity"))
{
- sinfg::String str(child->get_attribute("continuity")->get_value());
+ synfig::String str(child->get_attribute("continuity")->get_value());
waypoint->set_continuity(atof(str.c_str()));
}
if(child->get_attribute("bias"))
{
- sinfg::String str(child->get_attribute("bias")->get_value());
+ synfig::String str(child->get_attribute("bias")->get_value());
waypoint->set_bias(atof(str.c_str()));
}
// Parse begin/end waypoints
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::Activepoint Activepoint;
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
+ typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
String begin_sequence;
String end_sequence;
int space=timecode.find_first_of(' ');
priority=atoi(String(timecode,1,space-1).c_str());
timecode=String(timecode.begin()+space+1,timecode.end());
- //sinfg::info("priority: %d timecode: %s",priority,timecode.c_str());
+ //synfig::info("priority: %d timecode: %s",priority,timecode.c_str());
}
timing_info.push_back(
int space=timecode.find_first_of(' ');
priority=atoi(String(timecode,1,space-1).c_str());
timecode=String(timecode.begin()+space+1,timecode.end());
- //sinfg::info("priority: %d timecode: %s",priority,timecode.c_str());
+ //synfig::info("priority: %d timecode: %s",priority,timecode.c_str());
}
timing_info.push_back(
return canvas;
}
}
- catch(Exception::BadLinkName) { sinfg::error("BadLinkName Thrown"); }
- catch(Exception::BadType) { sinfg::error("BadType Thrown"); }
- catch(Exception::FileNotFound) { sinfg::error("FileNotFound Thrown"); }
- catch(Exception::IDNotFound) { sinfg::error("IDNotFound Thrown"); }
- catch(Exception::IDAlreadyExists) { sinfg::error("IDAlreadyExists Thrown"); }
+ catch(Exception::BadLinkName) { synfig::error("BadLinkName Thrown"); }
+ catch(Exception::BadType) { synfig::error("BadType Thrown"); }
+ catch(Exception::FileNotFound) { synfig::error("FileNotFound Thrown"); }
+ catch(Exception::IDNotFound) { synfig::error("IDNotFound Thrown"); }
+ catch(Exception::IDAlreadyExists) { synfig::error("IDAlreadyExists Thrown"); }
catch(const std::exception& ex)
{
- sinfg::error("Standard Exception: "+String(ex.what()));
+ synfig::error("Standard Exception: "+String(ex.what()));
return Canvas::Handle();
}
catch(const String& str)
{
cerr<<str<<endl;
- // sinfg::error(str);
+ // synfig::error(str);
return Canvas::Handle();
}
return Canvas::Handle();
return canvas;
}
}
- catch(Exception::BadLinkName) { sinfg::error("BadLinkName Thrown"); }
- catch(Exception::BadType) { sinfg::error("BadType Thrown"); }
- catch(Exception::FileNotFound) { sinfg::error("FileNotFound Thrown"); }
- catch(Exception::IDNotFound) { sinfg::error("IDNotFound Thrown"); }
- catch(Exception::IDAlreadyExists) { sinfg::error("IDAlreadyExists Thrown"); }
+ catch(Exception::BadLinkName) { synfig::error("BadLinkName Thrown"); }
+ catch(Exception::BadType) { synfig::error("BadType Thrown"); }
+ catch(Exception::FileNotFound) { synfig::error("FileNotFound Thrown"); }
+ catch(Exception::IDNotFound) { synfig::error("IDNotFound Thrown"); }
+ catch(Exception::IDAlreadyExists) { synfig::error("IDAlreadyExists Thrown"); }
catch(const std::exception& ex)
{
- sinfg::error("Standard Exception: "+String(ex.what()));
+ synfig::error("Standard Exception: "+String(ex.what()));
return Canvas::Handle();
}
catch(const String& str)
{
cerr<<str<<endl;
- // sinfg::error(str);
+ // synfig::error(str);
return Canvas::Handle();
}
return Canvas::Handle();
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file loadcanvas.h
** \brief writeme
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_LOADCANVAS_H
-#define __SINFG_LOADCANVAS_H
+#ifndef __SYNFIG_LOADCANVAS_H
+#define __SYNFIG_LOADCANVAS_H
/* === H E A D E R S ======================================================= */
namespace xmlpp { class Node; class Element; };
-namespace sinfg {
+namespace synfig {
/*! \class CanvasParser
** \todo writeme
//! Returns the number of warnings in the last parse
int warning_count()const { return total_warnings_; }
- void set_path(const sinfg::String& x) { path=x; }
+ void set_path(const synfig::String& x) { path=x; }
- const sinfg::String& get_path()const { return path; }
+ const synfig::String& get_path()const { return path; }
//! \todo writeme
Canvas::Handle parse_from_file(const String &filename);
//! Retrieves a Canvas from a string in XML format
extern Canvas::Handle string_to_canvas(const String &data);
-std::map<sinfg::String, etl::loose_handle<Canvas> >& get_open_canvas_map();
+std::map<synfig::String, etl::loose_handle<Canvas> >& get_open_canvas_map();
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file main.cpp
** \brief \writeme
**
/* === H E A D E R S ======================================================= */
-//#define SINFG_NO_ANGLE
+//#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-#define MODULE_LIST_FILENAME "sinfg_modules.cfg"
+#define MODULE_LIST_FILENAME "synfig_modules.cfg"
/* === S T A T I C S ======================================================= */
-static etl::reference_counter sinfg_ref_count_(0);
+static etl::reference_counter synfig_ref_count_(0);
/* === P R O C E D U R E S ================================================= */
const char *
-sinfg::get_version()
+synfig::get_version()
{
#ifdef VERSION
return VERSION;
}
const char *
-sinfg::get_build_date()
+synfig::get_build_date()
{
return __DATE__;
}
const char *
-sinfg::get_build_time()
+synfig::get_build_time()
{
return __TIME__;
}
extern const char *get_build_time();
bool
-sinfg::check_version_(int version,int vec_size, int color_size,int canvas_size,int layer_size)
+synfig::check_version_(int version,int vec_size, int color_size,int canvas_size,int layer_size)
{
bool ret=true;
CHECK_EXPIRE_TIME();
- if(version!=SINFG_LIBRARY_VERSION)
+ if(version!=SYNFIG_LIBRARY_VERSION)
{
- sinfg::error(_("API Version mismatch (LIB:%d, PROG:%d)"),SINFG_LIBRARY_VERSION,version);
+ synfig::error(_("API Version mismatch (LIB:%d, PROG:%d)"),SYNFIG_LIBRARY_VERSION,version);
ret=false;
}
if(vec_size!=sizeof(Vector))
{
- sinfg::error(_("Size of Vector mismatch (app:%d, lib:%d)"),vec_size,sizeof(Vector));
+ synfig::error(_("Size of Vector mismatch (app:%d, lib:%d)"),vec_size,sizeof(Vector));
ret=false;
}
if(color_size!=sizeof(Color))
{
- sinfg::error(_("Size of Color mismatch (app:%d, lib:%d)"),color_size,sizeof(Color));
+ synfig::error(_("Size of Color mismatch (app:%d, lib:%d)"),color_size,sizeof(Color));
ret=false;
}
if(canvas_size!=sizeof(Canvas))
{
- sinfg::error(_("Size of Canvas mismatch (app:%d, lib:%d)"),canvas_size,sizeof(Canvas));
+ synfig::error(_("Size of Canvas mismatch (app:%d, lib:%d)"),canvas_size,sizeof(Canvas));
ret=false;
}
if(layer_size!=sizeof(Layer))
{
- sinfg::error(_("Size of Layer mismatch (app:%d, lib:%d)"),layer_size,sizeof(Layer));
+ synfig::error(_("Size of Layer mismatch (app:%d, lib:%d)"),layer_size,sizeof(Layer));
ret=false;
}
}
static void broken_pipe_signal (int sig) {
- sinfg::warning("Broken Pipe...");
+ synfig::warning("Broken Pipe...");
}
bool retrieve_modules_to_load(String filename,std::list<String> &modules_to_load)
-sinfg::Main::Main(const sinfg::String& basepath,ProgressCallback *cb):
- ref_count_(sinfg_ref_count_)
+synfig::Main::Main(const synfig::String& basepath,ProgressCallback *cb):
+ ref_count_(synfig_ref_count_)
{
if(ref_count_.count())
return;
- sinfg_ref_count_.reset();
- ref_count_=sinfg_ref_count_;
+ synfig_ref_count_.reset();
+ ref_count_=synfig_ref_count_;
// Add initialization after this point
locations.push_back("standard");
locations.push_back("./"MODULE_LIST_FILENAME); //1
locations.push_back("../etc/"MODULE_LIST_FILENAME); //1
- locations.push_back("~/.sinfg/"MODULE_LIST_FILENAME); //2
+ locations.push_back("~/.synfig/"MODULE_LIST_FILENAME); //2
locations.push_back(prefix+"/etc/"+MODULE_LIST_FILENAME); //3
locations.push_back("/usr/local/etc/"MODULE_LIST_FILENAME);
#ifdef SYSCONFDIR
"standard", //0
"./"MODULE_LIST_FILENAME, //1
"../etc/"MODULE_LIST_FILENAME, //1
- "~/.sinfg/"MODULE_LIST_FILENAME, //2
- "/usr/local/lib/sinfg/modules/"MODULE_LIST_FILENAME, //3
+ "~/.synfig/"MODULE_LIST_FILENAME, //2
+ "/usr/local/lib/synfig/modules/"MODULE_LIST_FILENAME, //3
"/usr/local/etc/"MODULE_LIST_FILENAME,
#ifdef SYSCONFDIR
SYSCONFDIR"/"MODULE_LIST_FILENAME,
#endif
#ifdef __APPLE__
- "/Library/Frameworks/sinfg.framework/Resources/"MODULE_LIST_FILENAME,
- "/Library/SINFG/"MODULE_LIST_FILENAME,
- "~/Library/SINFG/"MODULE_LIST_FILENAME,
+ "/Library/Frameworks/synfig.framework/Resources/"MODULE_LIST_FILENAME,
+ "/Library/SYNFIG/"MODULE_LIST_FILENAME,
+ "~/Library/SYNFIG/"MODULE_LIST_FILENAME,
#endif
#ifdef WIN32
- "C:\\Program Files\\SINFG\\etc\\"MODULE_LIST_FILENAME,
+ "C:\\Program Files\\SYNFIG\\etc\\"MODULE_LIST_FILENAME,
#endif
};
*/
if(cb)cb->task(_("DONE"));
}
-sinfg::Main::~Main()
+synfig::Main::~Main()
{
ref_count_.detach();
- if(!sinfg_ref_count_.unique())
+ if(!synfig_ref_count_.unique())
return;
- sinfg_ref_count_.detach();
+ synfig_ref_count_.detach();
// Add deinitialization after this point
if(get_open_canvas_map().size())
{
- sinfg::warning("Canvases still open!");
- std::map<sinfg::String, etl::loose_handle<Canvas> >::iterator iter;
+ synfig::warning("Canvases still open!");
+ std::map<synfig::String, etl::loose_handle<Canvas> >::iterator iter;
for(iter=get_open_canvas_map().begin();iter!=get_open_canvas_map().end();++iter)
{
- sinfg::warning("%s: count()=%d",iter->first.c_str(), iter->second.count());
+ synfig::warning("%s: count()=%d",iter->first.c_str(), iter->second.count());
}
}
void
-sinfg::error(const char *format,...)
+synfig::error(const char *format,...)
{
va_list args;
va_start(args,format);
}
void
-sinfg::error(const String &str)
+synfig::error(const String &str)
{
static Mutex mutex; Mutex::Lock lock(mutex);
- cerr<<"sinfg("<<getpid()<<"): "<<_("error")<<": "+str<<endl;
+ cerr<<"synfig("<<getpid()<<"): "<<_("error")<<": "+str<<endl;
}
void
-sinfg::warning(const char *format,...)
+synfig::warning(const char *format,...)
{
va_list args;
va_start(args,format);
}
void
-sinfg::warning(const String &str)
+synfig::warning(const String &str)
{
static Mutex mutex; Mutex::Lock lock(mutex);
- cerr<<"sinfg("<<getpid()<<"): "<<_("warning")<<": "+str<<endl;
+ cerr<<"synfig("<<getpid()<<"): "<<_("warning")<<": "+str<<endl;
}
void
-sinfg::info(const char *format,...)
+synfig::info(const char *format,...)
{
va_list args;
va_start(args,format);
}
void
-sinfg::info(const String &str)
+synfig::info(const String &str)
{
static Mutex mutex; Mutex::Lock lock(mutex);
- cerr<<"sinfg("<<getpid()<<"): "<<_("info")<<": "+str<<endl;
+ cerr<<"synfig("<<getpid()<<"): "<<_("info")<<": "+str<<endl;
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file main.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MAIN_H
-#define __SINFG_MAIN_H
+#ifndef __SYNFIG_MAIN_H
+#define __SYNFIG_MAIN_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
-/*! \class sinfg::Main
+/*! \class synfig::Main
** \brief \writeme
**
** \writeme
{
etl::reference_counter ref_count_;
public:
- Main(const sinfg::String& basepath,ProgressCallback *cb=0);
+ Main(const synfig::String& basepath,ProgressCallback *cb=0);
~Main();
static void load_modules(ProgressCallback *cb=0);
const etl::reference_counter& ref_count()const { return ref_count_; }
}; // END of class Main
-}; // END if namespace sinfg
+}; // END if namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file module.cpp
** \brief writeme
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
-Module::Book *sinfg::Module::book_;
+Module::Book *synfig::Module::book_;
/* === P R O C E D U R E S ================================================= */
bool
Module::subsys_init(const String &prefix)
{
- #ifndef SINFG_LTDL_NO_STATIC
+ #ifndef SYNFIG_LTDL_NO_STATIC
//LTDL_SET_PRELOADED_SYMBOLS();
#endif
}
lt_dladdsearchdir(".");
- lt_dladdsearchdir("~/.sinfg/modules");
- lt_dladdsearchdir((prefix+"/lib/sinfg/modules").c_str());
+ lt_dladdsearchdir("~/.synfig/modules");
+ lt_dladdsearchdir((prefix+"/lib/synfig/modules").c_str());
#ifdef LIBDIR
- lt_dladdsearchdir(LIBDIR"/sinfg/modules");
+ lt_dladdsearchdir(LIBDIR"/synfig/modules");
#endif
#ifdef __APPLE__
- lt_dladdsearchdir("/Library/Frameworks/sinfg.framework/Resources/modules");
+ lt_dladdsearchdir("/Library/Frameworks/synfig.framework/Resources/modules");
#endif
- lt_dladdsearchdir("/usr/local/lib/sinfg/modules");
+ lt_dladdsearchdir("/usr/local/lib/synfig/modules");
lt_dladdsearchdir(".");
book_=new Book;
}
void
-sinfg::Module::Register(Module::Handle mod)
+synfig::Module::Register(Module::Handle mod)
{
book()[mod->Name()]=mod;
}
bool
-sinfg::Module::Register(const String &module_name, ProgressCallback *callback)
+synfig::Module::Register(const String &module_name, ProgressCallback *callback)
{
lt_dlhandle module;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file module.h
** \brief writeme
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MODULE_H
-#define __SINFG_MODULE_H
+#ifndef __SYNFIG_MODULE_H
+#define __SYNFIG_MODULE_H
/* === H E A D E R S ======================================================= */
/* === M A C R O S ========================================================= */
//! Marks the start of a module description
-#define MODULE_DESC_BEGIN(x) struct x##_modclass : public sinfg::Module { x##_modclass(sinfg::ProgressCallback *callback=NULL);
+#define MODULE_DESC_BEGIN(x) struct x##_modclass : public synfig::Module { x##_modclass(synfig::ProgressCallback *callback=NULL);
//! Sets the localized name of the module
#define MODULE_NAME(x) virtual const char * Name() { return x; }
#define MODULE_COPYRIGHT(x) virtual const char * Copyright() { return x; }
//! Describes the module's construction function
-#define MODULE_CONSTRUCTOR(x) bool constructor_(sinfg::ProgressCallback *cb) { return x(cb); }
+#define MODULE_CONSTRUCTOR(x) bool constructor_(synfig::ProgressCallback *cb) { return x(cb); }
//! Describes the module's destruction function
#define MODULE_DESTRUCTOR(x) virtual void destructor_() { return x(); }
#ifdef __APPLE__
//! Marks the start of a module's inventory
#define MODULE_INVENTORY_BEGIN(x) extern "C" { \
- sinfg::Module* _##x##_LTX_new_instance(sinfg::ProgressCallback *cb) \
- { if(SINFG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\
+ synfig::Module* _##x##_LTX_new_instance(synfig::ProgressCallback *cb) \
+ { if(SYNFIG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\
if(cb)cb->error(#x": Unable to load module due to version mismatch."); return NULL; } \
- }; x##_modclass::x##_modclass(sinfg::ProgressCallback *cb) {
+ }; x##_modclass::x##_modclass(synfig::ProgressCallback *cb) {
#else
//! Marks the start of a module's inventory
#define MODULE_INVENTORY_BEGIN(x) extern "C" { \
- sinfg::Module* x##_LTX_new_instance(sinfg::ProgressCallback *cb) \
- { if(SINFG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\
+ synfig::Module* x##_LTX_new_instance(synfig::ProgressCallback *cb) \
+ { if(SYNFIG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\
if(cb)cb->error(#x": Unable to load module due to version mismatch."); return NULL; } \
- }; x##_modclass::x##_modclass(sinfg::ProgressCallback *cb) {
+ }; x##_modclass::x##_modclass(synfig::ProgressCallback *cb) {
#endif
//! Marks the start of the layers in the module's inventory
#define BEGIN_LAYERS {
//! DEPRECATED - use @INCLUDE_LAYER()
-//#define LAYER(x) sinfg::Layer::book()[sinfg::String(x::name__)]=x::create;
-#define LAYER(class) sinfg::Layer::register_in_book(sinfg::Layer::BookEntry(class::create,class::name__,class::local_name__,class::category__,class::cvs_id__,class::version__));
-#define LAYER_ALIAS(class,alias) sinfg::Layer::register_in_book(sinfg::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__));
+//#define LAYER(x) synfig::Layer::book()[synfig::String(x::name__)]=x::create;
+#define LAYER(class) synfig::Layer::register_in_book(synfig::Layer::BookEntry(class::create,class::name__,class::local_name__,class::category__,class::cvs_id__,class::version__));
+#define LAYER_ALIAS(class,alias) synfig::Layer::register_in_book(synfig::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__));
//! Marks the end of the layers in the module's inventory
#define END_LAYERS }
//! Marks the start of the targets in the module's inventory
#define BEGIN_TARGETS {
-#define TARGET(x) sinfg::Target::book()[sinfg::String(x::name__)]=std::pair<sinfg::Target::Factory,sinfg::String>(x::create,sinfg::String(x::ext__));sinfg::Target::ext_book()[sinfg::String(x::ext__)]=x::name__;
+#define TARGET(x) synfig::Target::book()[synfig::String(x::name__)]=std::pair<synfig::Target::Factory,synfig::String>(x::create,synfig::String(x::ext__));synfig::Target::ext_book()[synfig::String(x::ext__)]=x::name__;
-#define TARGET_EXT(x,y) sinfg::Target::ext_book()[sinfg::String(y)]=x::name__;
+#define TARGET_EXT(x,y) synfig::Target::ext_book()[synfig::String(y)]=x::name__;
//! Marks the end of the targets in the module's inventory
#define END_TARGETS }
//! Marks the start of the importers in the module's inventory
#define BEGIN_IMPORTERS {
-#define IMPORTER(x) sinfg::Importer::book()[sinfg::String(x::ext__)]=x::create;
+#define IMPORTER(x) synfig::Importer::book()[synfig::String(x::ext__)]=x::create;
-#define IMPORTER_EXT(x,y) sinfg::Importer::book()[sinfg::String(y)]=x::create;
+#define IMPORTER_EXT(x,y) synfig::Importer::book()[synfig::String(y)]=x::create;
//! Marks the end of the importers in the module's inventory
#define END_IMPORTERS }
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ProgressCallback;
class Module : public etl::shared_object
{
public:
- bool constructor_(sinfg::ProgressCallback *cb) { return true; }
+ bool constructor_(synfig::ProgressCallback *cb) { return true; }
virtual void destructor_() { }
typedef etl::handle<Module> Handle;
virtual const char * Desc() { return " "; }
virtual const char * Author() { return " "; }
virtual const char * Version() { return " "; }
- virtual const char * Copyright() { return SINFG_COPYRIGHT; }
+ virtual const char * Copyright() { return SYNFIG_COPYRIGHT; }
virtual ~Module() { destructor_(); }
};
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file mutex.cpp
** \brief Template File
**
//using namespace std;
//using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file mutex.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_MUTEX_H
-#define __SINFG_MUTEX_H
+#ifndef __SYNFIG_MUTEX_H
+#define __SYNFIG_MUTEX_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class RecMutex;
bool writer_trylock();
};
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file node.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === P R O C E D U R E S ================================================= */
-sinfg::Node*
-sinfg::find_node(const GUID& guid)
+synfig::Node*
+synfig::find_node(const GUID& guid)
{
if(global_node_map().count(guid)==0)
return 0;
}
static void
-refresh_node(sinfg::Node* node, GUID old_guid)
+refresh_node(synfig::Node* node, GUID old_guid)
{
assert(global_node_map().count(old_guid));
global_node_map().erase(old_guid);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file node.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_PARENTNODE_H
-#define __SINFG_PARENTNODE_H
+#ifndef __SYNFIG_PARENTNODE_H
+#define __SYNFIG_PARENTNODE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class TimePoint
{
virtual void get_times_vfunc(time_set &set) const = 0;
};
-sinfg::Node* sinfg::find_node(const sinfg::GUID& guid);
+synfig::Node* synfig::find_node(const synfig::GUID& guid);
template<typename T> etl::handle<T>
-guid_cast(const sinfg::GUID& guid)
+guid_cast(const synfig::GUID& guid)
{
- return etl::handle<T>::cast_dynamic(sinfg::find_node(guid));
+ return etl::handle<T>::cast_dynamic(synfig::find_node(guid));
}
typedef etl::handle<Node> NodeHandle;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file template.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-#define PALETTE_FILE_COOKIE "SINFGPAL1.0"
+#define PALETTE_FILE_COOKIE "SYNFIGPAL1.0"
/* === G L O B A L S ======================================================= */
}
void
-Palette::save_to_file(const sinfg::String& filename)const
+Palette::save_to_file(const synfig::String& filename)const
{
const_iterator iter;
}
Palette
-Palette::load_from_file(const sinfg::String& filename)
+Palette::load_from_file(const synfig::String& filename)
{
std::ifstream file(filename.c_str());
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file Palette.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_PALETTE_H
-#define __SINFG_PALETTE_H
+#ifndef __SYNFIG_PALETTE_H
+#define __SYNFIG_PALETTE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Surface;
static Palette grayscale(int steps=16);
- void save_to_file(const sinfg::String& filename)const;
+ void save_to_file(const synfig::String& filename)const;
- static Palette load_from_file(const sinfg::String& filename);
+ static Palette load_from_file(const synfig::String& filename);
}; // END of class Palette
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file paramdesc.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-ParamDesc::ParamDesc(sinfg::Color::BlendMethod, const String &a):
+ParamDesc::ParamDesc(synfig::Color::BlendMethod, const String &a):
name_ (a),
local_name_ (a),
scalar_ (1.0),
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file paramdesc.h
** \brief ParamDesc Class Implementation
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_PARAMDESC_H
-#define __SINFG_PARAMDESC_H
+#ifndef __SYNFIG_PARAMDESC_H
+#define __SYNFIG_PARAMDESC_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueBase;
ParamDesc(const ValueBase&, const String &a);
- ParamDesc(sinfg::Color::BlendMethod, const String &a);
+ ParamDesc(synfig::Color::BlendMethod, const String &a);
/*
{
};
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
/* ========================================================================
-** Sinfg
+** Synfig
** Pre-Compiled Header
** $Id: pch.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_PCH_H
-#define __SINFG_PCH_H
+#ifndef __SYNFIG_PCH_H
+#define __SYNFIG_PCH_H
/* === H E A D E R S ======================================================= */
#include <iostream>
-#include "sinfg.h"
+#include "synfig.h"
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file template.cpp
** \brief Template File
**
using namespace std;
//using namespace etl;
-//using namespace sinfg;
+//using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file polynomial_root.h
** \brief Polynomial Root Finder Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_POLYNOMIAL_ROOT_H
-#define __SINFG_POLYNOMIAL_ROOT_H
+#ifndef __SYNFIG_POLYNOMIAL_ROOT_H
+#define __SYNFIG_POLYNOMIAL_ROOT_H
/* === H E A D E R S ======================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file nodebase.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_NODEBASE_H
-#define __SINFG_NODEBASE_H
+#ifndef __SYNFIG_NODEBASE_H
+#define __SYNFIG_NODEBASE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
namespace Proto {
typedef int Query;
}; // END of class Proto::NodeBase
}; // END of namespace Proto
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file protocol.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_PROTOCOL_H
-#define __SINFG_PROTOCOL_H
+#ifndef __SYNFIG_PROTOCOL_H
+#define __SYNFIG_PROTOCOL_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
-class Object
+/*
+ * class Object
{
public:
}
};
+*/
class Protocol
{
{
}; // END of class Protocol::Type
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file real.h
-** \brief Provides the sinfg::Real typedef
+** \brief Provides the synfig::Real typedef
**
** $Id: real.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_REAL_H
-#define __SINFG_REAL_H
+#ifndef __SYNFIG_REAL_H
+#define __SYNFIG_REAL_H
/* === T Y P E D E F S ===================================================== */
-namespace sinfg {
+namespace synfig {
/*! \typedef Real
** \todo writeme
*/
typedef double Real;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file rect.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file rect.h
** \brief Rectangle Class
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_RECT_H
-#define __SINFG_RECT_H
+#ifndef __SYNFIG_RECT_H
+#define __SYNFIG_RECT_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Rect : public etl::rect<Real>
{
bool is_valid()const { return valid(); }
}; // END of class Rect
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file renddesc.h_
** \brief RendDesc
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file renddesc.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_RENDERDESC_H
-#define __SINFG_RENDERDESC_H
+#ifndef __SYNFIG_RENDERDESC_H
+#define __SYNFIG_RENDERDESC_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class RendDesc
** \todo writeme
}
-}; /* end namespace sinfg */
+}; /* end namespace synfig */
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file render.cpp
** \brief Renderer
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
#endif
using namespace std;
-using namespace sinfg;
+using namespace synfig;
using namespace etl;
/* === M A C R O S ========================================================= */
/* === P R O C E D U R E S ================================================= */
bool
-sinfg::parametric_render(
+synfig::parametric_render(
Context context,
Surface &surface,
const RendDesc &desc,
}
bool
-sinfg::render(
+synfig::render(
Context context,
Target_Scanline::Handle target,
const RendDesc &desc,
}
bool
-sinfg::render_threaded(
+synfig::render_threaded(
Context context,
Target_Scanline::Handle target,
const RendDesc &desc,
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file render.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_RENDER_H
-#define __SINFG_RENDER_H
+#ifndef __SYNFIG_RENDER_H
+#define __SYNFIG_RENDER_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
//! Renders starting at \a context to \a target
/*! \warning \a Target::set_rend_desc() must have
ProgressCallback *callback,
int threads);
-}; /* end namespace sinfg */
+}; /* end namespace synfig */
/* -- E N D ----------------------------------------------------------------- */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file savecanvas.cpp
** \brief Writeme
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
case ValueBase::TYPE_CANVAS:
return encode_canvas(root,data.get(Canvas::Handle()).get());
case ValueBase::TYPE_NIL:
- sinfg::error("Encountered NIL ValueBase");
+ synfig::error("Encountered NIL ValueBase");
root->set_name("nil");
return root;
default:
- sinfg::error(strprintf("Unknown value(%s), cannot create XML representation!",ValueBase::type_name(data.get_type()).c_str()));
+ synfig::error(strprintf("Unknown value(%s), cannot create XML representation!",ValueBase::type_name(data.get_type()).c_str()));
root->set_name("nil");
return root;
}
// process waypoints
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::Activepoint Activepoint;
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
+ typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
String begin_sequence;
String end_sequence;
}
bool
-sinfg::save_canvas(const String &filename, Canvas::ConstHandle canvas)
+synfig::save_canvas(const String &filename, Canvas::ConstHandle canvas)
{
- sinfg::String tmp_filename(filename+".TMP");
+ synfig::String tmp_filename(filename+".TMP");
try
{
document.write_to_file_formatted(tmp_filename);
}
- catch(...) { sinfg::error("sinfg::save_canvas(): Caught unknown exception"); return false; }
+ catch(...) { synfig::error("synfig::save_canvas(): Caught unknown exception"); return false; }
#ifdef _WIN32
if(rename(tmp_filename.c_str(),filename.c_str())!=0)
{
rename(old_file,tmp_filename.c_str());
- sinfg::error("sinfg::save_canvas(): Unable to rename file to correct filename, errno=%d",errno);
+ synfig::error("synfig::save_canvas(): Unable to rename file to correct filename, errno=%d",errno);
return false;
}
remove(old_file);
#else
if(rename(tmp_filename.c_str(),filename.c_str())!=0)
{
- sinfg::error("sinfg::save_canvas(): Unable to rename file to correct filename, errno=%d",errno);
+ synfig::error("synfig::save_canvas(): Unable to rename file to correct filename, errno=%d",errno);
return false;
}
#endif
}
String
-sinfg::canvas_to_string(Canvas::ConstHandle canvas)
+synfig::canvas_to_string(Canvas::ConstHandle canvas)
{
assert(canvas);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file savecanvas.h
** \brief writeme
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_SAVECANVAS_H
-#define __SINFG_SAVECANVAS_H
+#ifndef __SYNFIG_SAVECANVAS_H
+#define __SYNFIG_SAVECANVAS_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/* === E X T E R N S ======================================================= */
//! Stores a Canvas in a string in XML format
String canvas_to_string(Canvas::ConstHandle canvas);
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file segment.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_SEGMENT_H
-#define __SINFG_SEGMENT_H
+#ifndef __SYNFIG_SEGMENT_H
+#define __SYNFIG_SEGMENT_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \struct Segment
** \todo writeme
{ }
}; // END of struct Segment
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
+++ /dev/null
-/* === S I N F G =========================================================== */
-/*! \file sinfg.h
-** \brief Primary Header for Sinfg
-**
-** $Id: sinfg.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
-**
-** \legal
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
-**
-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
-**
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
-** \endlegal
-*/
-/* ========================================================================= */
-
-/* === S T A R T =========================================================== */
-
-#ifndef __SINFG__
-#define __SINFG__
-
-#ifndef __cplusplus
-#error Sorry, Sinfg only supports C++ at this time. See README for details.
-#endif
-
-#warning The use of this header is deprecated. Please use the individual header files.
-
-/* === M A C R O S ========================================================= */
-
-/*! \def SINFG_LEAN
-** \brief Define this to remove unused features, speeding up compile time.
-**
-** Define SINFG_LEAN if your plug-in
-** or program doesn't use the sinfg::Angle class
-** or the rendering subsystem. This can speed up
-** compiles. You may also wish to individualy
-** use the macros SINFG_NO_ANGLE and
-** SINFG_NO_RENDER.
-** \see SINFG_NO_ANGLE, SINFG_NO_RENDER
-*/
-#ifdef SINFG_LEAN
-# ifndef SINFG_NO_ANGLE
-# define SINFG_NO_ANGLE
-# endif
-# ifndef SINFG_NO_RENDER
-# define SINFG_NO_RENDER
-# endif
-#endif
-
-/*! \def SINFG_LAYER
-** The SINFG_LAYER macro is useful for when you
-** are compiling layers, and can help to improve
-** build time.
-*/
-#ifdef SINFG_LAYER
-# ifndef SINFG_NO_RENDER
-# define SINFG_NO_RENDER
-# endif
-# define SINFG_NO_LOADSAVE
-#endif
-
-/*! \def SINFG_TARGET
-** The SINFG_TARGET macro is useful for when you
-** are compiling render targets, and can help to
-** improve build time.
-*/
-#ifdef SINFG_TARGET
-# ifdef SINFG_NO_RENDER
-# error You defined SINFG_TARGET, but also SINFG_NO_RENDER. This doesnt make sense.
-# endif
-# ifndef SINFG_NO_ANGLE
-# define SINFG_NO_ANGLE
-# endif
-# define SINFG_NO_LOADSAVE
-#endif
-
-/*! \def SINFG_MODULE
-** \todo Writeme
-*/
-#ifdef SINFG_MODULE
-# define SINFG_NO_LOADSAVE
-#endif
-
-/*! \namespace sinfg
-** \brief Where every function and class of the sinfg library can be found
-** \todo Writeme
-*/
-
-/* === H E A D E R S ======================================================= */
-
-#include "version.h"
-#include "general.h"
-#include "module.h"
-#include "color.h"
-#include "canvas.h"
-#include "layer.h"
-#include "vector.h"
-#include "types.h"
-#include "segment.h"
-
-#ifndef SINFG_NO_RENDER
-# include "render.h"
-#endif
-
-#ifndef SINFG_LAYER
-#include "target.h"
-#endif
-
-#include "valuenode.h"
-#include "valuenode_subtract.h"
-//#include "valuenode_animated.h"
-#include "valuenode_composite.h"
-#include "valuenode_const.h"
-#include "valuenode_linear.h"
-#include "valuenode_dynamiclist.h"
-#include "valuenode_reference.h"
-
-#ifndef SINFG_NO_LOADSAVE
-# include "savecanvas.h"
-# include "loadcanvas.h"
-#endif
-
-#include "importer.h"
-#include "surface.h"
-
-#include "string.h"
-
-/* === C L A S S E S & S T R U C T S ======================================= */
-
-/* === E N D =============================================================== */
-
-#endif
+++ /dev/null
-; The stuff to install\r
-Section "Synfig Core"\r
-\r
- SectionIn RO\r
- \r
- ; Set output path to the installation directory.\r
- SetOutPath "$INSTDIR\bin"\r
- \r
- ; Put file there\r
- File "src\sinfg\.libs\libsinfg-0.dll"\r
-\r
-SectionEnd\r
-\r
-Section "un.Synfig Core"\r
- Delete "$INSTDIR\bin\libsinfg-0.dll"\r
- RMDir "$INSTDIR"\r
-SectionEnd\r
-\r
-\r
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file smartfile.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_SMARTFILE_H
-#define __SINFG_SMARTFILE_H
+#ifndef __SYNFIG_SMARTFILE_H
+#define __SYNFIG_SMARTFILE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
struct _FILE_deleter
{
typedef etl::smart_ptr<FILE,_FILE_deleter> SmartFILE;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file string.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_STRING_H
-#define __SINFG_STRING_H
+#ifndef __SYNFIG_STRING_H
+#define __SYNFIG_STRING_H
/* === H E A D E R S ======================================================= */
}; // END of namespace std
*/
-namespace sinfg
+namespace synfig
{
/*! \typedef String
*/
typedef std::string String;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file string_decl.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_STRING_DECL_H
-#define __SINFG_STRING_DECL_H
+#ifndef __SYNFIG_STRING_DECL_H
+#define __SYNFIG_STRING_DECL_H
/* === H E A D E R S ======================================================= */
}; // END of namespace std
-namespace sinfg
+namespace synfig
{
/*! \typedef String
*/
typedef std::string String;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
/* ========================================================================
-** Sinfg
+** Synfig
** Template File
** $Id: surface.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef USING_PCH
# include "pch.h"
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-class target2surface : public sinfg::Target_Scanline
+class target2surface : public synfig::Target_Scanline
{
public:
Surface *surface;
target2surface(Surface *surface);
virtual ~target2surface();
- virtual bool set_rend_desc(sinfg::RendDesc *newdesc);
+ virtual bool set_rend_desc(synfig::RendDesc *newdesc);
- virtual bool start_frame(sinfg::ProgressCallback *cb);
+ virtual bool start_frame(synfig::ProgressCallback *cb);
virtual void end_frame();
}
bool
-target2surface::set_rend_desc(sinfg::RendDesc *newdesc)
+target2surface::set_rend_desc(synfig::RendDesc *newdesc)
{
assert(newdesc);
assert(surface);
desc=*newdesc;
- return sinfg::Target_Scanline::set_rend_desc(newdesc);
+ return synfig::Target_Scanline::set_rend_desc(newdesc);
}
bool
-target2surface::start_frame(sinfg::ProgressCallback *cb)
+target2surface::start_frame(synfig::ProgressCallback *cb)
{
if(surface->get_w() != desc.get_w() || surface->get_h() != desc.get_h())
{
/* === M E T H O D S ======================================================= */
Target_Scanline::Handle
-sinfg::surface_target(Surface *surface)
+synfig::surface_target(Surface *surface)
{
return Target_Scanline::Handle(new target2surface(surface));
}
void
-sinfg::Surface::clear()
+synfig::Surface::clear()
{
#ifdef HAS_VIMAGE
fill(Color(0.5,0.5,0.5,0.0000001));
}
void
-sinfg::Surface::blit_to(alpha_pen& pen, int x, int y, int w, int h)
+synfig::Surface::blit_to(alpha_pen& pen, int x, int y, int w, int h)
{
static const float epsilon(0.00001);
const float alpha(pen.get_alpha());
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file surface.h
** \brief Surface and Pen Definitions
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_SURFACE_H
-#define __SINFG_SURFACE_H
+#ifndef __SYNFIG_SURFACE_H
+#define __SYNFIG_SURFACE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Target;
class Target_Scanline;
//! Creates a target that will render to \a surface
etl::handle<Target_Scanline> surface_target(Surface *surface);
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file surfacenew.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file surfacenew.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_SURFACENEW_H
-#define __SINFG_SURFACENEW_H
+#ifndef __SYNFIG_SURFACENEW_H
+#define __SYNFIG_SURFACENEW_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Surface;
class SurfaceChannelLock;
}; // END of class ChannelLock
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file synfig.h
+** \brief Primary Header for Synfig
+**
+** $Id: synfig.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $
+**
+** \legal
+** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**
+** This software and associated documentation
+** are CONFIDENTIAL and PROPRIETARY property of
+** the above-mentioned copyright holder.
+**
+** You may not copy, print, publish, or in any
+** other way distribute this software without
+** a prior written agreement with
+** the copyright holder.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG__
+#define __SYNFIG__
+
+#ifndef __cplusplus
+#error Sorry, Synfig only supports C++ at this time. See README for details.
+#endif
+
+#warning The use of this header is deprecated. Please use the individual header files.
+
+/* === M A C R O S ========================================================= */
+
+/*! \def SYNFIG_LEAN
+** \brief Define this to remove unused features, speeding up compile time.
+**
+** Define SYNFIG_LEAN if your plug-in
+** or program doesn't use the synfig::Angle class
+** or the rendering subsystem. This can speed up
+** compiles. You may also wish to individualy
+** use the macros SYNFIG_NO_ANGLE and
+** SYNFIG_NO_RENDER.
+** \see SYNFIG_NO_ANGLE, SYNFIG_NO_RENDER
+*/
+#ifdef SYNFIG_LEAN
+# ifndef SYNFIG_NO_ANGLE
+# define SYNFIG_NO_ANGLE
+# endif
+# ifndef SYNFIG_NO_RENDER
+# define SYNFIG_NO_RENDER
+# endif
+#endif
+
+/*! \def SYNFIG_LAYER
+** The SYNFIG_LAYER macro is useful for when you
+** are compiling layers, and can help to improve
+** build time.
+*/
+#ifdef SYNFIG_LAYER
+# ifndef SYNFIG_NO_RENDER
+# define SYNFIG_NO_RENDER
+# endif
+# define SYNFIG_NO_LOADSAVE
+#endif
+
+/*! \def SYNFIG_TARGET
+** The SYNFIG_TARGET macro is useful for when you
+** are compiling render targets, and can help to
+** improve build time.
+*/
+#ifdef SYNFIG_TARGET
+# ifdef SYNFIG_NO_RENDER
+# error You defined SYNFIG_TARGET, but also SYNFIG_NO_RENDER. This doesnt make sense.
+# endif
+# ifndef SYNFIG_NO_ANGLE
+# define SYNFIG_NO_ANGLE
+# endif
+# define SYNFIG_NO_LOADSAVE
+#endif
+
+/*! \def SYNFIG_MODULE
+** \todo Writeme
+*/
+#ifdef SYNFIG_MODULE
+# define SYNFIG_NO_LOADSAVE
+#endif
+
+/*! \namespace synfig
+** \brief Where every function and class of the synfig library can be found
+** \todo Writeme
+*/
+
+/* === H E A D E R S ======================================================= */
+
+#include "version.h"
+#include "general.h"
+#include "module.h"
+#include "color.h"
+#include "canvas.h"
+#include "layer.h"
+#include "vector.h"
+#include "types.h"
+#include "segment.h"
+
+#ifndef SYNFIG_NO_RENDER
+# include "render.h"
+#endif
+
+#ifndef SYNFIG_LAYER
+#include "target.h"
+#endif
+
+#include "valuenode.h"
+#include "valuenode_subtract.h"
+//#include "valuenode_animated.h"
+#include "valuenode_composite.h"
+#include "valuenode_const.h"
+#include "valuenode_linear.h"
+#include "valuenode_dynamiclist.h"
+#include "valuenode_reference.h"
+
+#ifndef SYNFIG_NO_LOADSAVE
+# include "savecanvas.h"
+# include "loadcanvas.h"
+#endif
+
+#include "importer.h"
+#include "surface.h"
+
+#include "string.h"
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+/* === E N D =============================================================== */
+
+#endif
--- /dev/null
+; The stuff to install\r
+Section "Synfig Core"\r
+\r
+ SectionIn RO\r
+ \r
+ ; Set output path to the installation directory.\r
+ SetOutPath "$INSTDIR\bin"\r
+ \r
+ ; Put file there\r
+ File "src\synfig\.libs\libsynfig-0.dll"\r
+\r
+SectionEnd\r
+\r
+Section "un.Synfig Core"\r
+ Delete "$INSTDIR\bin\libsynfig-0.dll"\r
+ RMDir "$INSTDIR"\r
+SectionEnd\r
+\r
+\r
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target.cpp
** \brief Target Class Implementation
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
#ifdef HAVE_CONFIG_H
# include <config.h>
#include "target_null.h"
#include "target_null_tile.h"
-using namespace sinfg;
+using namespace synfig;
using namespace etl;
using namespace std;
-sinfg::Target::Book* sinfg::Target::book_;
-sinfg::Target::ExtBook* sinfg::Target::ext_book_;
+synfig::Target::Book* synfig::Target::book_;
+synfig::Target::ExtBook* synfig::Target::ext_book_;
-static sinfg::Gamma* default_gamma_;
+static synfig::Gamma* default_gamma_;
/* === P R O C E D U R E S ================================================= */
bool
Target::subsys_init()
{
- book_=new sinfg::Target::Book();
- ext_book_=new sinfg::Target::ExtBook();
+ book_=new synfig::Target::Book();
+ ext_book_=new synfig::Target::ExtBook();
- default_gamma_=new sinfg::Gamma(1.0/2.2);
+ default_gamma_=new synfig::Gamma(1.0/2.2);
//default_gamma_->set_black_level(0.05); // Default to 5% black level.
- book()["null"]=std::pair<sinfg::Target::Factory,String>(Target_Null::create,"null");
+ book()["null"]=std::pair<synfig::Target::Factory,String>(Target_Null::create,"null");
ext_book()["null"]="null";
- book()["null-tile"]=std::pair<sinfg::Target::Factory,String>(Target_Null_Tile::create,"null-tile");
+ book()["null-tile"]=std::pair<synfig::Target::Factory,String>(Target_Null_Tile::create,"null-tile");
ext_book()["null-tile"]="null-tile";
return true;
}
void
-sinfg::Target::set_canvas(Canvas::Handle c)
+synfig::Target::set_canvas(Canvas::Handle c)
{
canvas=c;
RendDesc desc=canvas->rend_desc();
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target.h
** \brief Target Class Implementation
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TARGET_H
-#define __SINFG_TARGET_H
+#ifndef __SYNFIG_TARGET_H
+#define __SYNFIG_TARGET_H
/* === H E A D E R S ======================================================= */
/* === M A C R O S ========================================================= */
//! \writeme
-#define SINFG_TARGET_MODULE_EXT public: static const char name__[], version__[], ext__[],cvs_id__[]; static Target *create(const char *filename);
+#define SYNFIG_TARGET_MODULE_EXT public: static const char name__[], version__[], ext__[],cvs_id__[]; static Target *create(const char *filename);
//! Sets the name of the target
-#define SINFG_TARGET_SET_NAME(class,x) const char class::name__[]=x
+#define SYNFIG_TARGET_SET_NAME(class,x) const char class::name__[]=x
//! \writeme
-#define SINFG_TARGET_SET_EXT(class,x) const char class::ext__[]=x
+#define SYNFIG_TARGET_SET_EXT(class,x) const char class::ext__[]=x
//! Sets the version of the target
-#define SINFG_TARGET_SET_VERSION(class,x) const char class::version__[]=x
+#define SYNFIG_TARGET_SET_VERSION(class,x) const char class::version__[]=x
//! Sets the CVS ID of the target
-#define SINFG_TARGET_SET_CVS_ID(class,x) const char class::cvs_id__[]=x
+#define SYNFIG_TARGET_SET_CVS_ID(class,x) const char class::cvs_id__[]=x
//! \writeme
-#define SINFG_TARGET_INIT(class) sinfg::Target* class::create(const char *filename) { return new class(filename); }
+#define SYNFIG_TARGET_INIT(class) synfig::Target* class::create(const char *filename) { return new class(filename); }
/* === T Y P E D E F S ===================================================== */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Surface;
class RendDesc;
static Handle create(const String &type, const String &filename);
}; // END of class Target
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target_multi.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
}
bool
-Target_Multi::add_frame(const sinfg::Surface *surface)
+Target_Multi::add_frame(const synfig::Surface *surface)
{
return a->add_frame(surface) && b->add_frame(surface);
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target_multi.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TARGET_MULTI_H
-#define __SINFG_TARGET_MULTI_H
+#ifndef __SYNFIG_TARGET_MULTI_H
+#define __SYNFIG_TARGET_MULTI_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Target_Multi
** \brief Render-target
Target_Multi(Target_Scanline::Handle a,Target_Scanline::Handle b);
virtual ~Target_Multi();
- virtual bool add_frame(const sinfg::Surface *surface);
+ virtual bool add_frame(const synfig::Surface *surface);
virtual bool start_frame(ProgressCallback *cb=NULL);
virtual void end_frame();
virtual Color * start_scanline(int scanline);
virtual bool init();
}; // END of class Target_Multi
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target_null.cpp
** \brief Template File
**
//using namespace std;
//using namespace etl;
-//using namespace sinfg;
+//using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target_null.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TARGET_NULL_H
-#define __SINFG_TARGET_NULL_H
+#ifndef __SYNFIG_TARGET_NULL_H
+#define __SYNFIG_TARGET_NULL_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Target_Null
** \brief A target which renders to nothing. Useful for benchmarks and other tests.
static Target* create(const char *filename=0) { return new Target_Null(); }
}; // END of class Target_Null
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target_null_tile.cpp
** \brief Template File
**
//using namespace std;
//using namespace etl;
-//using namespace sinfg;
+//using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target_null_tile.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TARGET_NULL_TILE_H
-#define __SINFG_TARGET_NULL_TILE_H
+#ifndef __SYNFIG_TARGET_NULL_TILE_H
+#define __SYNFIG_TARGET_NULL_TILE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Target_Null_Tile
** \brief A target which renders to nothing using tiles. Useful for benchmarks and other tests.
public:
~Target_Null_Tile() { }
- virtual bool add_tile(const sinfg::Surface &surface, int x, int y) { return true; }
+ virtual bool add_tile(const synfig::Surface &surface, int x, int y) { return true; }
virtual bool start_frame(ProgressCallback *cb=NULL)
{ return true; }
static Target* create(const char *filename=0) { return new Target_Null_Tile(); }
}; // END of class Target_Null_Tile
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target_scanline.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-#define SINFG_OPTIMIZE_LAYER_TREE 1
+#define SYNFIG_OPTIMIZE_LAYER_TREE 1
#define PIXEL_RENDERING_LIMIT 1500000
time=(time_end-time_start)*curr_frame_/total_frames+time_start;
curr_frame_++;
-/* sinfg::info("curr_frame_: %d",curr_frame_);
- sinfg::info("total_frames: %d",total_frames);
- sinfg::info("time_end: %s",time_end.get_string().c_str());
- sinfg::info("time_start: %s",time_start.get_string().c_str());
+/* synfig::info("curr_frame_: %d",curr_frame_);
+ synfig::info("total_frames: %d",total_frames);
+ synfig::info("time_end: %s",time_end.get_string().c_str());
+ synfig::info("time_start: %s",time_start.get_string().c_str());
*/
-// sinfg::info("time: %s",time.get_string().c_str());
+// synfig::info("time: %s",time.get_string().c_str());
return total_frames- curr_frame_+1;
}
bool
-sinfg::Target_Scanline::render(ProgressCallback *cb)
+synfig::Target_Scanline::render(ProgressCallback *cb)
{
SuperCallback super_cb;
int
// Grab the time
int i=next_frame(t);
- //sinfg::info("1time_set_to %s",t.get_string().c_str());
+ //synfig::info("1time_set_to %s",t.get_string().c_str());
if(i>1)
do{
Context context;
- #ifdef SINFG_OPTIMIZE_LAYER_TREE
+ #ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Canvas::Handle op_canvas(Canvas::create());
optimize_layers(canvas->get_context(), op_canvas);
context=op_canvas->get_context();
{
if(threads_<=0)
{
- if(!sinfg::render(context,this,desc,0))
+ if(!synfig::render(context,this,desc,0))
return false;
}
else
{
- if(!sinfg::render_threaded(context,this,desc,0,threads_))
+ if(!synfig::render_threaded(context,this,desc,0,threads_))
return false;
}
}
#if USE_PIXELRENDERING_LIMIT
if(desc.get_w()*desc.get_h() > PIXEL_RENDERING_LIMIT)
{
- sinfg::info("Render BROKEN UP! (%d pixels)", desc.get_w()*desc.get_h());
+ synfig::info("Render BROKEN UP! (%d pixels)", desc.get_w()*desc.get_h());
Surface surface;
int rowheight = PIXEL_RENDERING_LIMIT/desc.get_w();
rows++;
- sinfg::info("\t blockh=%d,remh=%d,totrows=%d", rowheight,lastrowheight,rows);
+ synfig::info("\t blockh=%d,remh=%d,totrows=%d", rowheight,lastrowheight,rows);
// loop through all the full rows
if(!start_frame())
canvas->set_time(t);
Context context;
- #ifdef SINFG_OPTIMIZE_LAYER_TREE
+ #ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Canvas::Handle op_canvas(Canvas::create());
optimize_layers(canvas->get_context(), op_canvas);
context=op_canvas->get_context();
{
if(threads_<=0)
{
- if(!sinfg::render(context,this,desc,cb))
+ if(!synfig::render(context,this,desc,cb))
return false;
}
else
{
- if(!sinfg::render_threaded(context,this,desc,cb,threads_))
+ if(!synfig::render_threaded(context,this,desc,cb,threads_))
return false;
}
}
#if USE_PIXELRENDERING_LIMIT
if(desc.get_w()*desc.get_h() > PIXEL_RENDERING_LIMIT)
{
- sinfg::info("Render BROKEN UP! (%d pixels)", desc.get_w()*desc.get_h());
+ synfig::info("Render BROKEN UP! (%d pixels)", desc.get_w()*desc.get_h());
Surface surface;
int totalheight = desc.get_h();
rows++;
- sinfg::info("\t blockh=%d,remh=%d,totrows=%d", rowheight,lastrowheight,rows);
+ synfig::info("\t blockh=%d,remh=%d,totrows=%d", rowheight,lastrowheight,rows);
// loop through all the full rows
if(!start_frame())
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target_scanline.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TARGET_SCANLINE_H
-#define __SINFG_TARGET_SCANLINE_H
+#ifndef __SYNFIG_TARGET_SCANLINE_H
+#define __SYNFIG_TARGET_SCANLINE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Target_Scanline
** \brief Render-target
int get_threads()const { return threads_; }
- bool add_frame(const sinfg::Surface *surface);
+ bool add_frame(const synfig::Surface *surface);
private:
}; // END of class Target_Scanline
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target_tile.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
const unsigned int DEF_TILE_WIDTH = 64;
const unsigned int DEF_TILE_HEIGHT= 64;
-#define SINFG_OPTIMIZE_LAYER_TREE 1
+#define SYNFIG_OPTIMIZE_LAYER_TREE 1
#ifdef _DEBUG
-#define SINFG_DISPLAY_EFFICIENCY 1
+#define SYNFIG_DISPLAY_EFFICIENCY 1
#endif
/* === G L O B A L S ======================================================= */
time=(time_end-time_start)*curr_frame_/total_frames+time_start;
curr_frame_++;
-/* sinfg::info("curr_frame_: %d",curr_frame_);
- sinfg::info("total_frames: %d",total_frames);
- sinfg::info("time_end: %s",time_end.get_string().c_str());
- sinfg::info("time_start: %s",time_start.get_string().c_str());
+/* synfig::info("curr_frame_: %d",curr_frame_);
+ synfig::info("total_frames: %d",total_frames);
+ synfig::info("time_end: %s",time_end.get_string().c_str());
+ synfig::info("time_start: %s",time_start.get_string().c_str());
*/
-// sinfg::info("time: %s",time.get_string().c_str());
+// synfig::info("time: %s",time.get_string().c_str());
return total_frames- curr_frame_+1;
}
}
bool
-sinfg::Target_Tile::render_frame_(Context context,ProgressCallback *cb)
+synfig::Target_Tile::render_frame_(Context context,ProgressCallback *cb)
{
if(tile_w_<=0||tile_h_<=0)
{
if(cb && !cb->amount_complete(total_tiles,total_tiles))
return false;
-#if SINFG_DISPLAY_EFFICIENCY==1
- sinfg::info(">>>>>> Render Time: %fsec, Find Tile Time: %fsec, Add Tile Time: %fsec, Total Time: %fsec",work_time,find_tile_time,add_tile_time,total_time());
- sinfg::info(">>>>>> FRAME EFICIENCY: %f%%",(100.0f*work_time/total_time()));
+#if SYNFIG_DISPLAY_EFFICIENCY==1
+ synfig::info(">>>>>> Render Time: %fsec, Find Tile Time: %fsec, Add Tile Time: %fsec, Total Time: %fsec",work_time,find_tile_time,add_tile_time,total_time());
+ synfig::info(">>>>>> FRAME EFICIENCY: %f%%",(100.0f*work_time/total_time()));
#endif
#undef total_tiles
return true;
}
bool
-sinfg::Target_Tile::render(ProgressCallback *cb)
+synfig::Target_Tile::render(ProgressCallback *cb)
{
SuperCallback super_cb;
int
// Grab the time
i=next_frame(t);
- //sinfg::info("1time_set_to %s",t.get_string().c_str());
+ //synfig::info("1time_set_to %s",t.get_string().c_str());
if(i>=1)
{
Context context;
- #ifdef SINFG_OPTIMIZE_LAYER_TREE
+ #ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Canvas::Handle op_canvas(Canvas::create());
optimize_layers(canvas->get_context(), op_canvas);
context=op_canvas->get_context();
#endif
/*
- #ifdef SINFG_OPTIMIZE_LAYER_TREE
+ #ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Context context;
Canvas::Handle op_canvas(Canvas::create());
// Set the time that we wish to render
return false;
end_frame();
}while((i=next_frame(t)));
- //sinfg::info("tilerenderer: i=%d, t=%s",i,t.get_string().c_str());
+ //synfig::info("tilerenderer: i=%d, t=%s",i,t.get_string().c_str());
}
else
{
// if(!get_avoid_time_sync() || canvas->get_time()!=t)
canvas->set_time(t);
- //sinfg::info("2time_set_to %s",t.get_string().c_str());
+ //synfig::info("2time_set_to %s",t.get_string().c_str());
Context context;
- #ifdef SINFG_OPTIMIZE_LAYER_TREE
+ #ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Canvas::Handle op_canvas(Canvas::create());
optimize_layers(canvas->get_context(), op_canvas);
context=op_canvas->get_context();
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file target_tile.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TARGET_TILE_H
-#define __SINFG_TARGET_TILE_H
+#ifndef __SYNFIG_TARGET_TILE_H
+#define __SYNFIG_TARGET_TILE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Target_Tile
** \brief Render-target
virtual int next_frame(Time& time);
//! Adds the tile at \a x , \a y contained in \a surface
- virtual bool add_tile(const sinfg::Surface &surface, int x, int y)=0;
+ virtual bool add_tile(const synfig::Surface &surface, int x, int y)=0;
virtual int total_tiles()const
{
}; // END of class Target_Tile
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file time.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
#define tolower ::tolower
// to warn about units if the value is zero
// it is the only case where units are irrelevant.
if(amount!=0)
- sinfg::warning("Time(): No unit provided in time code, assuming SECONDS (\"%s\")",str.c_str());
+ synfig::warning("Time(): No unit provided in time code, assuming SECONDS (\"%s\")",str.c_str());
value_+=amount;
return;
}
if(fps)
value_+=amount/fps;
else
- sinfg::warning("Time(): Individual frames referenced, but frame rate is unknown");
+ synfig::warning("Time(): Individual frames referenced, but frame rate is unknown");
break;
case ':':
// try to read it in as a traditional time format
return;
}
}
- sinfg::warning("Time(): Bad time format");
+ synfig::warning("Time(): Bad time format");
break;
default:
value_+=amount;
- sinfg::warning("Time(): Unexpected character '%c' when parsing time string \"%s\"",str[pos],str.c_str());
+ synfig::warning("Time(): Unexpected character '%c' when parsing time string \"%s\"",str[pos],str.c_str());
break;
}
pos++;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file time.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TIME_H
-#define __SINFG_TIME_H
+#ifndef __SYNFIG_TIME_H
+#define __SYNFIG_TIME_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Time
** \todo writeme
Time(const String &string, float fps=0);
//! Marks the exclusive negative boundary of time
- static const Time begin() { return static_cast<sinfg::Time>(-32767.0f*512.0f); }
+ static const Time begin() { return static_cast<synfig::Time>(-32767.0f*512.0f); }
//! Marks the exclusive positive boundary of time
- static const Time end() { return static_cast<sinfg::Time>(32767.0f*512.0f); }
+ static const Time end() { return static_cast<synfig::Time>(32767.0f*512.0f); }
//! Marks zero time
- static const Time zero() { return static_cast<sinfg::Time>(0); }
+ static const Time zero() { return static_cast<synfig::Time>(0); }
//! The amount of allowable error in calculations
- static const Time epsilon() { return static_cast<sinfg::Time>(epsilon_()); }
+ static const Time epsilon() { return static_cast<synfig::Time>(epsilon_()); }
//! Returns a string describing the current time value
/*! \see Format */
inline bool operator<=(Time::Format lhs, Time::Format rhs)
{ return (static_cast<int>(lhs) & static_cast<int>(rhs))==static_cast<int>(rhs); }
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file template.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
//! \writeme
int
-sinfg::waypoint_collect(set<Waypoint, std::less<UniqueID> >& waypoint_set,const Time& time, const etl::handle<Node>& node)
+synfig::waypoint_collect(set<Waypoint, std::less<UniqueID> >& waypoint_set,const Time& time, const etl::handle<Node>& node)
{
const TimePointSet& timepoint_set(node->get_times());
//! \writeme
int
-sinfg::activepoint_collect(set<Activepoint, std::less<UniqueID> >& activepoint_set,const Time& time, const etl::handle<Node>& node)
+synfig::activepoint_collect(set<Activepoint, std::less<UniqueID> >& activepoint_set,const Time& time, const etl::handle<Node>& node)
{
const TimePointSet& timepoint_set(node->get_times());
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file timepointcollect.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TIMEPOINTCOLLECT_H
-#define __SINFG_TIMEPOINTCOLLECT_H
+#ifndef __SYNFIG_TIMEPOINTCOLLECT_H
+#define __SYNFIG_TIMEPOINTCOLLECT_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
//! \writeme
int waypoint_collect(std::set<Waypoint, std::less<UniqueID> >& waypoint_set,const Time& time, const etl::handle<Node>& node);
//! \writeme
int activepoint_collect(std::set<Activepoint, std::less<UniqueID> >& activepoint_set,const Time& time, const etl::handle<Node>& node);
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file template.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-sinfg::GUID
+synfig::GUID
TransformStack::get_guid()const
{
GUID ret(0);
return ret;
}
-sinfg::Vector
-TransformStack::perform(const sinfg::Vector& x)const
+synfig::Vector
+TransformStack::perform(const synfig::Vector& x)const
{
- sinfg::Vector ret(x);
+ synfig::Vector ret(x);
for(const_reverse_iterator iter(rbegin());iter!=rend();++iter)
ret=(*iter)->perform(ret);
return ret;
}
-sinfg::Vector
-TransformStack::unperform(const sinfg::Vector& x)const
+synfig::Vector
+TransformStack::unperform(const synfig::Vector& x)const
{
- sinfg::Vector ret(x);
+ synfig::Vector ret(x);
for(const_iterator iter(begin());iter!=end();++iter)
ret=(*iter)->unperform(ret);
return ret;
}
-sinfg::Rect
-TransformStack::perform(const sinfg::Rect& x)const
+synfig::Rect
+TransformStack::perform(const synfig::Rect& x)const
{
Point min(x.get_min());
Point max(x.get_max());
return ret;
}
-sinfg::Rect
-TransformStack::unperform(const sinfg::Rect& x)const
+synfig::Rect
+TransformStack::unperform(const synfig::Rect& x)const
{
Point min(x.get_min());
Point max(x.get_max());
return ret;
}
-sinfg::Rect
-Transform::perform(const sinfg::Rect& x)const
+synfig::Rect
+Transform::perform(const synfig::Rect& x)const
{
if(x.area()>1000000000000.0)
return Rect::full_plane();
return ret;
}
-sinfg::Rect
-Transform::unperform(const sinfg::Rect& x)const
+synfig::Rect
+Transform::unperform(const synfig::Rect& x)const
{
if(x.area()>1000000000000.0)
return Rect::full_plane();
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file transform.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TRANSFORM_H
-#define __SINFG_TRANSFORM_H
+#ifndef __SYNFIG_TRANSFORM_H
+#define __SYNFIG_TRANSFORM_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Transform : public etl::shared_object
{
const GUID& get_guid()const { return guid_; }
virtual ~Transform() { }
- virtual sinfg::Vector perform(const sinfg::Vector& x)const=0;
- virtual sinfg::Vector unperform(const sinfg::Vector& x)const=0;
+ virtual synfig::Vector perform(const synfig::Vector& x)const=0;
+ virtual synfig::Vector unperform(const synfig::Vector& x)const=0;
- virtual sinfg::Rect perform(const sinfg::Rect& x)const;
- virtual sinfg::Rect unperform(const sinfg::Rect& x)const;
+ virtual synfig::Rect perform(const synfig::Rect& x)const;
+ virtual synfig::Rect unperform(const synfig::Rect& x)const;
}; // END of class Transform
public:
GUID get_guid()const;
- sinfg::Vector perform(const sinfg::Vector& x)const;
- sinfg::Vector unperform(const sinfg::Vector& x)const;
+ synfig::Vector perform(const synfig::Vector& x)const;
+ synfig::Vector unperform(const synfig::Vector& x)const;
- sinfg::Rect perform(const sinfg::Rect& x)const;
- sinfg::Rect unperform(const sinfg::Rect& x)const;
+ synfig::Rect perform(const synfig::Rect& x)const;
+ synfig::Rect unperform(const synfig::Rect& x)const;
void push(const Transform::Handle& x) { if(x)push_back(x); }
void pop() { pop_back(); }
}; // END of class TransformStack
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file types.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TYPES_H
-#define __SINFG_TYPES_H
+#ifndef __SYNFIG_TYPES_H
+#define __SYNFIG_TYPES_H
/* === H E A D E R S ======================================================= */
#include <cmath>
-#ifndef SINFG_NO_ANGLE
+#ifndef SYNFIG_NO_ANGLE
#include "angle.h"
#endif
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file uniqueid.cpp
** \brief Template File
**
/* === U S I N G =========================================================== */
using namespace std;
-using namespace sinfg;
+using namespace synfig;
/* === G L O B A L S ======================================================= */
/* === M E T H O D S ======================================================= */
int
-sinfg::UniqueID::next_id()
+synfig::UniqueID::next_id()
{
return ++uniqueid_pool_;
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file uniqueid.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_UNIQUEID_H
-#define __SINFG_UNIQUEID_H
+#ifndef __SYNFIG_UNIQUEID_H
+#define __SYNFIG_UNIQUEID_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class UniqueIDLessThan;
};
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file value.cpp
** \brief Template Header
**
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
default:
break;
}
- sinfg::warning("Encountered unknown ValueBase with an Type of %d",id);
+ synfig::warning("Encountered unknown ValueBase with an Type of %d",id);
// assert(0);
return "UNKNOWN";
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file value.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUE_H
-#define __SINFG_VALUE_H
+#ifndef __SYNFIG_VALUE_H
+#define __SYNFIG_VALUE_H
/* === H E A D E R S ======================================================= */
#include "blinepoint.h"
#include "exception.h"
-#ifndef SINFG_NO_ANGLE
+#ifndef SYNFIG_NO_ANGLE
#include "angle.h"
#endif
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Canvas;
class Vector;
operator half()const { return get(Real()); }
#endif
-#ifndef SINFG_NO_ANGLE
+#ifndef SYNFIG_NO_ANGLE
operator const Angle&()const { return get(Angle()); }
static const Type get_type(const Angle&) { return TYPE_ANGLE; }
#endif
}; // END of class Value
*/
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file value_node.cpp
** \brief Template File
**
/* === H E A D E R S ======================================================= */
-#define SINFG_NO_ANGLE
+#define SYNFIG_NO_ANGLE
//#define HAS_HASH_MAP 1
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
ValueNode::LooseHandle
-sinfg::find_value_node(const GUID& guid)
+synfig::find_value_node(const GUID& guid)
{
return guid_cast<ValueNode>(guid);
}
/* if(global_value_node_map.size() || value_node_count)
{
if(value_node_count)
- sinfg::error("%d ValueNodes haven't been destroyed yet!",value_node_count);
+ synfig::error("%d ValueNodes haven't been destroyed yet!",value_node_count);
if(global_value_node_map.size()!=value_node_count)
- sinfg::error("value node count mismatch! map.size()!=value_node_count (%d!=%d)",global_value_node_map.size(),value_node_count);
+ synfig::error("value node count mismatch! map.size()!=value_node_count (%d!=%d)",global_value_node_map.size(),value_node_count);
GlobalValueNodeMap::iterator iter;
for(iter=global_value_node_map.begin();iter!=global_value_node_map.end();++iter)
{
if(!iter->second->is_exported())
- sinfg::info("%s: count:%d name:%s type:%s",
+ synfig::info("%s: count:%d name:%s type:%s",
iter->first.get_string().c_str(),
iter->second->count(),
iter->second->get_name().c_str(),
ValueBase::type_name(iter->second->get_type()).c_str()
);
else
- sinfg::info("%s: id:%s count:%d name:%s type:%s",
+ synfig::info("%s: id:%s count:%d name:%s type:%s",
iter->first.get_string().c_str(),
iter->second->get_id().c_str(),
iter->second->count(),
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_H
-#define __SINFG_VALUENODE_H
+#ifndef __SYNFIG_VALUENODE_H
+#define __SYNFIG_VALUENODE_H
/* === H E A D E R S ======================================================= */
#include <sigc++/signal.h>
#include "guid.h"
-#ifndef SINFG_NO_ANGLE
+#ifndef SYNFIG_NO_ANGLE
#include <ETL/angle>
#endif
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class Canvas;
class LinkableValueNode;
/*! \class ValueNode
** \todo writeme
*/
-class ValueNode : public sinfg::Node
+class ValueNode : public synfig::Node
{
friend class Layer;
friend class LinkableValueNode;
ValueNode::LooseHandle find_value_node(const GUID& guid);
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_animated.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === C L A S S E S ======================================================= */
template<typename T>
-class _Hermite : public sinfg::ValueNode_Animated
+class _Hermite : public synfig::ValueNode_Animated
{
public:
typedef T value_type;
//value_type vect=(value_type)(Pn-Pc);
// Debugging stuff
- //sinfg::info("%d:t1: %s",i,tangent_info(Pp,Pn,vect).c_str());
+ //synfig::info("%d:t1: %s",i,tangent_info(Pp,Pn,vect).c_str());
// Adjust for time
//vect=value_type(vect*(curve.second.get_dt()*2.0)/(curve.second.get_dt()+curve_list.back().second.get_dt()));
//value_type vect=(value_type)(Pc-Pp);
// Debugging stuff
- //sinfg::info("%d:t2: %s",i,tangent_info(Pp,Pn,vect).c_str());
+ //synfig::info("%d:t2: %s",i,tangent_info(Pp,Pn,vect).c_str());
// Adjust for time
//vect=value_type(vect*(curve.second.get_dt()*2.0)/(curve.second.get_dt()+(after_next->get_time()-next->get_time())));
template<typename T>
-class _Constant : public sinfg::ValueNode_Animated
+class _Constant : public synfig::ValueNode_Animated
{
public:
typedef T value_type;
}
};
-class _AnimBool : public sinfg::ValueNode_Animated
+class _AnimBool : public synfig::ValueNode_Animated
{
public:
typedef bool value_type;
}
waypoint.set_time(time);
waypoint.set_parent_value_node(const_cast<ValueNode_Animated*>(this));
-// sinfg::info("waypoint.get_after()=set to %d",waypoint.get_after());
-// sinfg::info("waypoint.get_before()=set to %d",waypoint.get_before());
+// synfig::info("waypoint.get_after()=set to %d",waypoint.get_after());
+// synfig::info("waypoint.get_before()=set to %d",waypoint.get_before());
return waypoint;
}
}
ValueNode_Animated::Handle
-sinfg::ValueNode_Animated::create(ValueBase::Type type)
+synfig::ValueNode_Animated::create(ValueBase::Type type)
{
switch(type)
{
return ValueNode_Animated::Handle(new _Constant<Canvas::LooseHandle>);
default:
throw
- Exception::BadType(strprintf(_("%s: You cannot use a %s in an animated ValueNode"),"sinfg::ValueNode_Animated::create()",
+ Exception::BadType(strprintf(_("%s: You cannot use a %s in an animated ValueNode"),"synfig::ValueNode_Animated::create()",
ValueBase::type_name(type).c_str())
);
break;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_animated.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_ANIMATED_H
-#define __SINFG_VALUENODE_ANIMATED_H
+#ifndef __SYNFIG_VALUENODE_ANIMATED_H
+#define __SYNFIG_VALUENODE_ANIMATED_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
struct ValueNode_Animated : public ValueNode
{
typedef etl::handle<ValueNode_Animated> Handle;
typedef etl::handle<const ValueNode_Animated> ConstHandle;
- typedef sinfg::Waypoint Waypoint;
- typedef sinfg::WaypointList WaypointList;
+ typedef synfig::Waypoint Waypoint;
+ typedef synfig::WaypointList WaypointList;
typedef std::pair<WaypointList::iterator,bool> findresult;
typedef std::pair<WaypointList::const_iterator,bool> const_findresult;
DCAST_HACK_ID(4);
};
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_bline.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
ValueBase
-sinfg::convert_bline_to_segment_list(const ValueBase& bline)
+synfig::convert_bline_to_segment_list(const ValueBase& bline)
{
std::vector<Segment> ret;
}
ValueBase
-sinfg::convert_bline_to_width_list(const ValueBase& bline)
+synfig::convert_bline_to_width_list(const ValueBase& bline)
{
std::vector<Real> ret;
// std::vector<BLinePoint> list(bline.operator std::vector<BLinePoint>());
ValueNode_BLine::ListEntry ret;
- sinfg::BLinePoint prev,next;
+ synfig::BLinePoint prev,next;
int prev_i,next_i;
next_i=index;
prev_i=find_prev_valid_entry(index,time);
- sinfg::info("index=%d, next_i=%d, prev_i=%d",index,next_i,prev_i);
+ synfig::info("index=%d, next_i=%d, prev_i=%d",index,next_i,prev_i);
next=(*list[next_i].value_node)(time);
prev=(*list[prev_i].value_node)(time);
etl::hermite<Vector> curve(prev.get_vertex(),next.get_vertex(),prev.get_tangent2(),next.get_tangent1());
etl::derivative< etl::hermite<Vector> > deriv(curve);
- sinfg::BLinePoint bline_point;
+ synfig::BLinePoint bline_point;
bline_point.set_vertex(curve(origin));
bline_point.set_width((next.get_width()-prev.get_width())*origin+prev.get_width());
bline_point.set_tangent1(deriv(origin)*min(1.0-origin,origin));
float prev_tangent_scalar(1.0f);
float next_tangent_scalar(1.0f);
- //sinfg::info("index_%d:dist_from_begin=%d",index,dist_from_begin);
- //sinfg::info("index_%d:dist_from_end=%d",index,dist_from_end);
+ //synfig::info("index_%d:dist_from_begin=%d",index,dist_from_begin);
+ //synfig::info("index_%d:dist_from_end=%d",index,dist_from_end);
// If we are the next to the begin
if(begin_iter==--std::vector<ListEntry>::const_iterator(iter) || dist_from_begin==1)
*/
if(list.empty())
- sinfg::warning(string("ValueNode_BLine::operator()():")+_("No entries in list"));
+ synfig::warning(string("ValueNode_BLine::operator()():")+_("No entries in list"));
else
if(ret_list.empty())
- sinfg::warning(string("ValueNode_BLine::operator()():")+_("No entries in ret_list"));
+ synfig::warning(string("ValueNode_BLine::operator()():")+_("No entries in ret_list"));
return ValueBase(ret_list,get_loop());
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_bline.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_BLINE_H
-#define __SINFG_VALUENODE_BLINE_H
+#ifndef __SYNFIG_VALUENODE_BLINE_H
+#define __SYNFIG_VALUENODE_BLINE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
//! Converts a list of bline points into a list of segments
LinkableValueNode* create_new()const;
public:
- //using sinfg::LinkableValueNode::set_link_vfunc;
+ //using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_BLine* create(const ValueBase &x=ValueBase::TYPE_LIST);
}; // END of class ValueNode_BLine
typedef ValueNode_BLine::ListEntry::ActivepointList ActivepointList;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_composite.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-sinfg::ValueNode_Composite::ValueNode_Composite(const ValueBase &value):
+synfig::ValueNode_Composite::ValueNode_Composite(const ValueBase &value):
LinkableValueNode(value.get_type())
{
switch(get_type())
}
ValueBase
-sinfg::ValueNode_Composite::operator()(Time t)const
+synfig::ValueNode_Composite::operator()(Time t)const
{
switch(get_type())
{
return ret;
}
default:
- sinfg::error(string("ValueNode_Composite::operator():")+_("Bad type for composite"));
+ synfig::error(string("ValueNode_Composite::operator():")+_("Bad type for composite"));
assert(components[0]);
return (*components[0])(t);
}
case ValueBase::TYPE_BLINEPOINT:
return 6;
default:
- sinfg::warning(string("ValueNode_Composite::component_count():")+_("Bad type for composite"));
+ synfig::warning(string("ValueNode_Composite::component_count():")+_("Bad type for composite"));
return 1;
}
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_composite.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_COMPOSITE_H
-#define __SINFG_VALUENODE_COMPOSITE_H
+#ifndef __SYNFIG_VALUENODE_COMPOSITE_H
+#define __SYNFIG_VALUENODE_COMPOSITE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode_Composite : public LinkableValueNode
{
LinkableValueNode* create_new()const;
public:
- using sinfg::LinkableValueNode::set_link_vfunc;
- using sinfg::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_Composite* create(const ValueBase &x);
}; // END of class ValueNode_Composite
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file template.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_const.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_CONST_H
-#define __SINFG_VALUENODE_CONST_H
+#ifndef __SYNFIG_VALUENODE_CONST_H
+#define __SYNFIG_VALUENODE_CONST_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode_Const : public ValueNode
{
virtual void get_times_vfunc(Node::time_set &set) const;
};
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_dynamiclist.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
ValueNode_DynamicList::ListEntry::ActivepointList::iterator
ValueNode_DynamicList::ListEntry::add(Time time, bool status, int priority)
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList::iterator iterator;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList::iterator iterator;
//! \optimize
Activepoint ap(time,status,priority);
ValueNode_DynamicList::ListEntry::ActivepointList::iterator
ValueNode_DynamicList::ListEntry::add(const Activepoint &x)
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList::iterator iterator;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList::iterator iterator;
//! \optimize
Activepoint ap(x);
ValueNode_DynamicList::ListEntry ret;
- sinfg::ValueBase prev,next;
+ synfig::ValueBase prev,next;
index=index%link_count();
ValueNode_DynamicList::ListEntry::ActivepointList::iterator
ValueNode_DynamicList::ListEntry::find(const Time& x)
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
ActivepointList::iterator iter;
ValueNode_DynamicList::ListEntry::ActivepointList::const_iterator
ValueNode_DynamicList::ListEntry::find(const Time& x)const
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
ActivepointList::const_iterator iter;
ValueNode_DynamicList::ListEntry::ActivepointList::iterator
ValueNode_DynamicList::ListEntry::find_next(const Time& x)
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
ActivepointList::iterator iter;
ValueNode_DynamicList::ListEntry::ActivepointList::const_iterator
ValueNode_DynamicList::ListEntry::find_next(const Time& x)const
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
ActivepointList::const_iterator iter;
ValueNode_DynamicList::ListEntry::ActivepointList::iterator
ValueNode_DynamicList::ListEntry::find_prev(const Time& x)
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
ActivepointList::iterator iter;
iter=timing_info.end();
ValueNode_DynamicList::ListEntry::ActivepointList::const_iterator
ValueNode_DynamicList::ListEntry::find_prev(const Time& x)const
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
ActivepointList::const_iterator iter;
iter=timing_info.end();
float
ValueNode_DynamicList::ListEntry::amount_at_time(const Time &t,bool *rising)const
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::Activepoint Activepoint;
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
+ typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
if(timing_info.empty())
return 1.0f;
bool
ValueNode_DynamicList::ListEntry::status_at_time(const Time &t)const
{
- typedef sinfg::ValueNode_DynamicList::ListEntry::Activepoint Activepoint;
- typedef sinfg::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
+ typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint;
+ typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
ActivepointList::const_iterator entry_iter;
ActivepointList::const_iterator prev_iter;
ret_list.push_back((*iter->value_node)(t));
else
{
- sinfg::warning(string("ValueNode_DynamicList::operator()():")+_("List type/item type mismatch, throwing away mismatch"));
+ synfig::warning(string("ValueNode_DynamicList::operator()():")+_("List type/item type mismatch, throwing away mismatch"));
}
}
}
if(list.empty())
- sinfg::warning(string("ValueNode_DynamicList::operator()():")+_("No entries in list"));
+ synfig::warning(string("ValueNode_DynamicList::operator()():")+_("No entries in list"));
else
if(ret_list.empty())
- sinfg::warning(string("ValueNode_DynamicList::operator()():")+_("No entries in ret_list"));
+ synfig::warning(string("ValueNode_DynamicList::operator()():")+_("No entries in ret_list"));
return ret_list;
}
return curr_item;
}
-const sinfg::Node::time_set & ValueNode_DynamicList::ListEntry::get_times() const
+const synfig::Node::time_set & ValueNode_DynamicList::ListEntry::get_times() const
{
- sinfg::ActivepointList::const_iterator j = timing_info.begin(),
+ synfig::ActivepointList::const_iterator j = timing_info.begin(),
end = timing_info.end();
//must remerge with all the other values because we don't know if we've changed...
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_dynamiclist.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_DYNAMICLIST_H
-#define __SINFG_VALUENODE_DYNAMICLIST_H
+#ifndef __SYNFIG_VALUENODE_DYNAMICLIST_H
+#define __SYNFIG_VALUENODE_DYNAMICLIST_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode_BLine;
/*! \class ValueNode_DynamicList
** However, it does have it's problems.
**
** The problems arrise when we introduce the concept of a
-** Keyframe. Keyframes can be manipulated via the Sinfg
+** Keyframe. Keyframes can be manipulated via the Synfig
** Application Library. They allow the user to quickly
** and "automagickly" rearange an animation by moving
** the associated keyframes. With they old way that the
friend class ValueNode_DynamicList;
friend class ValueNode_BLine;
public:
- typedef sinfg::Activepoint Activepoint;
+ typedef synfig::Activepoint Activepoint;
typedef std::list<Activepoint> ActivepointList;
int find(const Time& begin,const Time& end,std::vector<Activepoint*>& list);
- const sinfg::Node::time_set &get_times() const;
+ const synfig::Node::time_set &get_times() const;
const etl::loose_handle<ValueNode> &get_parent_value_node()const { return parent_; }
** (which is ValueBase::TYPE_LIST)
*/
static Handle create(ValueBase::Type id=ValueBase::TYPE_NIL);
- using sinfg::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_DynamicList* create_from(const ValueBase &x=ValueBase::TYPE_GRADIENT);
}; // END of class ValueNode_DynamicList
typedef ValueNode_DynamicList::ListEntry::Activepoint Activepoint;
typedef ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_gradientrotate.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-sinfg::ValueNode_GradientRotate::ValueNode_GradientRotate():
- LinkableValueNode(sinfg::ValueBase::TYPE_GRADIENT)
+synfig::ValueNode_GradientRotate::ValueNode_GradientRotate():
+ LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT)
{
set_link("gradient",ValueNode_Const::create(Gradient()));
set_link("offset",ValueNode_Const::create(Real(0)));
if(id!=ValueBase::TYPE_GRADIENT)
{
assert(0);
- throw runtime_error("sinfg::ValueNode_GradientRotate:Bad type "+ValueBase::type_name(id));
+ throw runtime_error("synfig::ValueNode_GradientRotate:Bad type "+ValueBase::type_name(id));
}
ValueNode_GradientRotate* value_node=new ValueNode_GradientRotate();
return value_node;
}
-sinfg::ValueNode_GradientRotate::~ValueNode_GradientRotate()
+synfig::ValueNode_GradientRotate::~ValueNode_GradientRotate()
{
unlink_all();
}
bool
-sinfg::ValueNode_GradientRotate::set_gradient(ValueNode::Handle a)
+synfig::ValueNode_GradientRotate::set_gradient(ValueNode::Handle a)
{
if(a->get_type()!=ValueBase::TYPE_GRADIENT&& !PlaceholderValueNode::Handle::cast_dynamic(a))
return false;
}
bool
-sinfg::ValueNode_GradientRotate::set_offset(ValueNode::Handle b)
+synfig::ValueNode_GradientRotate::set_offset(ValueNode::Handle b)
{
if(b->get_type()!=ValueBase::TYPE_REAL&& !PlaceholderValueNode::Handle::cast_dynamic(b))
return false;
return true;
}
-sinfg::ValueBase
-sinfg::ValueNode_GradientRotate::operator()(Time t)const
+synfig::ValueBase
+synfig::ValueNode_GradientRotate::operator()(Time t)const
{
Gradient gradient;
gradient=(*ref_gradient)(t).get(gradient);
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_twotone.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_GRADIENTROTATE_H
-#define __SINFG_VALUENODE_GRADIENTROTATE_H
+#ifndef __SYNFIG_VALUENODE_GRADIENTROTATE_H
+#define __SYNFIG_VALUENODE_GRADIENTROTATE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
struct ValueNode_GradientRotate : public LinkableValueNode
{
LinkableValueNode* create_new()const;
public:
- using sinfg::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_GradientRotate* create(const ValueBase &x=ValueBase::TYPE_GRADIENT);
}; // END of class ValueNode_GradientRotate
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_linear.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_linear.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_INTERPOLATION_LINEAR_H
-#define __SINFG_VALUENODE_INTERPOLATION_LINEAR_H
+#ifndef __SYNFIG_VALUENODE_INTERPOLATION_LINEAR_H
+#define __SYNFIG_VALUENODE_INTERPOLATION_LINEAR_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode_Linear : public LinkableValueNode
{
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
public:
- using sinfg::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_Linear* create(const ValueBase &x);
}; // END of class ValueNode_Linear
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_radialcomposite.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-sinfg::ValueNode_RadialComposite::ValueNode_RadialComposite(const ValueBase &value):
+synfig::ValueNode_RadialComposite::ValueNode_RadialComposite(const ValueBase &value):
LinkableValueNode(value.get_type())
{
switch(get_type())
}
ValueBase
-sinfg::ValueNode_RadialComposite::operator()(Time t)const
+synfig::ValueNode_RadialComposite::operator()(Time t)const
{
switch(get_type())
{
);
}
default:
- sinfg::error(string("ValueNode_RadialComposite::operator():")+_("Bad type for radialcomposite"));
+ synfig::error(string("ValueNode_RadialComposite::operator():")+_("Bad type for radialcomposite"));
assert(components[0]);
return (*components[0])(t);
}
case ValueBase::TYPE_COLOR:
return 4;
default:
- sinfg::warning(string("ValueNode_RadialComposite::component_count():")+_("Bad type for radialcomposite"));
+ synfig::warning(string("ValueNode_RadialComposite::component_count():")+_("Bad type for radialcomposite"));
return 1;
}
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_radialcomposite.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_RADIALCOMPOSITE_H
-#define __SINFG_VALUENODE_RADIALCOMPOSITE_H
+#ifndef __SYNFIG_VALUENODE_RADIALCOMPOSITE_H
+#define __SYNFIG_VALUENODE_RADIALCOMPOSITE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode_RadialComposite : public LinkableValueNode
{
LinkableValueNode* create_new()const;
public:
- using sinfg::LinkableValueNode::set_link_vfunc;
- using sinfg::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_RadialComposite* create(const ValueBase &x);
}; // END of class ValueNode_RadialComposite
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_reference.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_reference.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_REFERENCE_H
-#define __SINFG_VALUENODE_REFERENCE_H
+#ifndef __SYNFIG_VALUENODE_REFERENCE_H
+#define __SYNFIG_VALUENODE_REFERENCE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode_Reference : public LinkableValueNode
{
LinkableValueNode* create_new()const;
public:
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_Reference* create(const ValueBase &x);
}; // END of class ValueNode_Reference
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_scale.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-ValueNode_Scale::ValueNode_Scale():LinkableValueNode(sinfg::ValueBase::TYPE_NIL)
+ValueNode_Scale::ValueNode_Scale():LinkableValueNode(synfig::ValueBase::TYPE_NIL)
{
set_scalar(1.0);
}
break;
default:
assert(0);
- throw runtime_error("sinfg::ValueNode_Scale:Bad type "+ValueBase::type_name(x.get_type()));
+ throw runtime_error("synfig::ValueNode_Scale:Bad type "+ValueBase::type_name(x.get_type()));
}
assert(value_node);
assert(value_node->get_type()==x.get_type());
return new ValueNode_Scale();
}
-sinfg::ValueNode_Scale::~ValueNode_Scale()
+synfig::ValueNode_Scale::~ValueNode_Scale()
{
unlink_all();
}
}
-sinfg::ValueBase
-sinfg::ValueNode_Scale::operator()(Time t)const
+synfig::ValueBase
+synfig::ValueNode_Scale::operator()(Time t)const
{
if(!value_node || !scalar)
throw runtime_error(strprintf("ValueNode_Scale: %s",_("One or both of my parameters aren't set!")));
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_scale.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_SCALE_H
-#define __SINFG_VALUENODE_SCALE_H
+#ifndef __SYNFIG_VALUENODE_SCALE_H
+#define __SYNFIG_VALUENODE_SCALE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
struct ValueNode_Scale : public LinkableValueNode
{
virtual LinkableValueNode* create_new()const;
public:
- using sinfg::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_Scale* create(const ValueBase &x);
}; // END of class ValueNode_Scale
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_segcalctangent.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_segcalctangent.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_SEGCALCTANGENT_H
-#define __SINFG_VALUENODE_SEGCALCTANGENT_H
+#ifndef __SYNFIG_VALUENODE_SEGCALCTANGENT_H
+#define __SYNFIG_VALUENODE_SEGCALCTANGENT_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode_SegCalcTangent : public LinkableValueNode
{
LinkableValueNode* create_new()const;
public:
- using sinfg::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_SegCalcTangent* create(const ValueBase &x=ValueBase::TYPE_VECTOR);
}; // END of class ValueNode_SegCalcTangent
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_segcalcvertex.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_segcalcvertex.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_SEGCALCVERTEX_H
-#define __SINFG_VALUENODE_SEGCALCVERTEX_H
+#ifndef __SYNFIG_VALUENODE_SEGCALCVERTEX_H
+#define __SYNFIG_VALUENODE_SEGCALCVERTEX_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode_SegCalcVertex : public LinkableValueNode
{
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
public:
- using sinfg::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_SegCalcVertex* create(const ValueBase &x=ValueBase::TYPE_VECTOR);
}; // END of class ValueNode_SegCalcVertex
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_sine.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_sine.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_SINE_H
-#define __SINFG_VALUENODE_SINE_H
+#ifndef __SYNFIG_VALUENODE_SINE_H
+#define __SYNFIG_VALUENODE_SINE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode_Sine : public LinkableValueNode
{
virtual bool set_link_vfunc(int i,ValueNode::Handle x);
public:
- using sinfg::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_Sine* create(const ValueBase &x);
}; // END of class ValueNode_Sine
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_subtract.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-sinfg::ValueNode_Stripes::ValueNode_Stripes():LinkableValueNode(sinfg::ValueBase::TYPE_GRADIENT)
+synfig::ValueNode_Stripes::ValueNode_Stripes():LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT)
{
set_link("color1",ValueNode_Const::create(Color::alpha()));
set_link("color2",ValueNode_Const::create(Color::black()));
if(id!=ValueBase::TYPE_GRADIENT)
{
assert(0);
- throw runtime_error("sinfg::ValueNode_Stripes:Bad type "+ValueBase::type_name(id));
+ throw runtime_error("synfig::ValueNode_Stripes:Bad type "+ValueBase::type_name(id));
}
ValueNode_Stripes* value_node=new ValueNode_Stripes();
return value_node;
}
-sinfg::ValueNode_Stripes::~ValueNode_Stripes()
+synfig::ValueNode_Stripes::~ValueNode_Stripes()
{
unlink_all();
}
bool
-sinfg::ValueNode_Stripes::set_color1(ValueNode::Handle a)
+synfig::ValueNode_Stripes::set_color1(ValueNode::Handle a)
{
if(a->get_type()!=ValueBase::TYPE_COLOR)
return false;
}
bool
-sinfg::ValueNode_Stripes::set_color2(ValueNode::Handle a)
+synfig::ValueNode_Stripes::set_color2(ValueNode::Handle a)
{
if(a->get_type()!=ValueBase::TYPE_COLOR)
return false;
}
bool
-sinfg::ValueNode_Stripes::set_width(ValueNode::Handle x)
+synfig::ValueNode_Stripes::set_width(ValueNode::Handle x)
{
if(x->get_type()!=ValueBase::TYPE_REAL)
return false;
}
bool
-sinfg::ValueNode_Stripes::set_stripes(ValueNode::Handle b)
+synfig::ValueNode_Stripes::set_stripes(ValueNode::Handle b)
{
if(b->get_type()!=ValueBase::TYPE_INTEGER)
return false;
return true;
}
-sinfg::ValueBase
-sinfg::ValueNode_Stripes::operator()(Time t)const
+synfig::ValueBase
+synfig::ValueNode_Stripes::operator()(Time t)const
{
const int total((*stripes_)(t).get(int()));
int i;
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_stripes.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_STRIPES_H
-#define __SINFG_VALUENODE_STRIPES_H
+#ifndef __SYNFIG_VALUENODE_STRIPES_H
+#define __SYNFIG_VALUENODE_STRIPES_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
struct ValueNode_Stripes : public LinkableValueNode
{
LinkableValueNode* create_new()const;
public:
- using sinfg::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_Stripes* create(const ValueBase &x=ValueBase::TYPE_GRADIENT);
}; // END of class ValueNode_Stripes
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_subtract.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-sinfg::ValueNode_Subtract::ValueNode_Subtract():LinkableValueNode(sinfg::ValueBase::TYPE_NIL)
+synfig::ValueNode_Subtract::ValueNode_Subtract():LinkableValueNode(synfig::ValueBase::TYPE_NIL)
{
set_scalar(1.0);
}
break;
default:
assert(0);
- throw runtime_error("sinfg::ValueNode_Subtract:Bad type "+ValueBase::type_name(id));
+ throw runtime_error("synfig::ValueNode_Subtract:Bad type "+ValueBase::type_name(id));
}
assert(value_node->get_type()==id);
return value_node;
}
-sinfg::ValueNode_Subtract::~ValueNode_Subtract()
+synfig::ValueNode_Subtract::~ValueNode_Subtract()
{
unlink_all();
}
}
bool
-sinfg::ValueNode_Subtract::set_scalar(ValueNode::Handle x)
+synfig::ValueNode_Subtract::set_scalar(ValueNode::Handle x)
{
if(x->get_type()!=ValueBase::TYPE_REAL&& !PlaceholderValueNode::Handle::cast_dynamic(x))
return false;
}
bool
-sinfg::ValueNode_Subtract::set_lhs(ValueNode::Handle a)
+synfig::ValueNode_Subtract::set_lhs(ValueNode::Handle a)
{
ref_a=a;
set_type(ValueBase::TYPE_COLOR);
else
{
- sinfg::warning(get_id()+":(set_a):"+strprintf(_("Types seem to be off for ValueNodes %s and %s"),ref_a->get_id().c_str(),ref_b->get_id().c_str()));
+ synfig::warning(get_id()+":(set_a):"+strprintf(_("Types seem to be off for ValueNodes %s and %s"),ref_a->get_id().c_str(),ref_b->get_id().c_str()));
set_type(ValueBase::TYPE_NIL);
}
}
bool
-sinfg::ValueNode_Subtract::set_rhs(ValueNode::Handle b)
+synfig::ValueNode_Subtract::set_rhs(ValueNode::Handle b)
{
ref_b=b;
set_type(ValueBase::TYPE_COLOR);
else
{
- sinfg::warning(get_id()+":(set_b):"+strprintf(_("Types seem to be off for ValueNodes %s and %s"),ref_a->get_id().c_str(),ref_b->get_id().c_str()));
+ synfig::warning(get_id()+":(set_b):"+strprintf(_("Types seem to be off for ValueNodes %s and %s"),ref_a->get_id().c_str(),ref_b->get_id().c_str()));
set_type(ValueBase::TYPE_NIL);
}
return true;
}
-sinfg::ValueBase
-sinfg::ValueNode_Subtract::operator()(Time t)const
+synfig::ValueBase
+synfig::ValueNode_Subtract::operator()(Time t)const
{
if(!ref_a || !ref_b)
throw runtime_error(strprintf("ValueNode_Subtract: %s",_("One or both of my parameters aren't set!")));
if(get_type()==ValueBase::TYPE_COLOR)
return ((*ref_a)(t).get(Color())-(*ref_b)(t).get(Color()))*(*scalar)(t).get(Real());
- sinfg::error(get_id()+':'+strprintf(_("Cannot subtract types of %s and %s"),ValueBase::type_name(ref_a->get_type()).c_str(),ValueBase::type_name(ref_b->get_type()).c_str()));
+ synfig::error(get_id()+':'+strprintf(_("Cannot subtract types of %s and %s"),ValueBase::type_name(ref_a->get_type()).c_str(),ValueBase::type_name(ref_b->get_type()).c_str()));
return ValueBase();
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_subtract.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_SUBTRACT_H
-#define __SINFG_VALUENODE_SUBTRACT_H
+#ifndef __SYNFIG_VALUENODE_SUBTRACT_H
+#define __SYNFIG_VALUENODE_SUBTRACT_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
struct ValueNode_Subtract : public LinkableValueNode
{
LinkableValueNode* create_new()const;
public:
- using sinfg::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_Subtract* create(const ValueBase &x=ValueBase());
}; // END of class ValueNode_Subtract
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_timedswap.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
}
-sinfg::ValueNode_TimedSwap::~ValueNode_TimedSwap()
+synfig::ValueNode_TimedSwap::~ValueNode_TimedSwap()
{
unlink_all();
}
-sinfg::ValueBase
-sinfg::ValueNode_TimedSwap::operator()(Time t)const
+synfig::ValueBase
+synfig::ValueNode_TimedSwap::operator()(Time t)const
{
Time swptime=(*swap_time)(t).get(Time());
Time swplength=(*swap_length)(t).get(Time());
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_timedswap.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_TIMEDSWAP_H
-#define __SINFG_VALUENODE_TIMEDSWAP_H
+#ifndef __SYNFIG_VALUENODE_TIMEDSWAP_H
+#define __SYNFIG_VALUENODE_TIMEDSWAP_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
struct ValueNode_TimedSwap : public LinkableValueNode
{
virtual LinkableValueNode* create_new()const;
public:
- using sinfg::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_TimedSwap* create(const ValueBase &x);
}; // END of class ValueNode_TimedSwap
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_subtract.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M E T H O D S ======================================================= */
-sinfg::ValueNode_TwoTone::ValueNode_TwoTone():LinkableValueNode(sinfg::ValueBase::TYPE_GRADIENT)
+synfig::ValueNode_TwoTone::ValueNode_TwoTone():LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT)
{
set_link("color1",ValueNode_Const::create(Color::black()));
set_link("color2",ValueNode_Const::create(Color::white()));
if(id!=ValueBase::TYPE_GRADIENT)
{
assert(0);
- throw runtime_error("sinfg::ValueNode_TwoTone:Bad type "+ValueBase::type_name(id));
+ throw runtime_error("synfig::ValueNode_TwoTone:Bad type "+ValueBase::type_name(id));
}
ValueNode_TwoTone* value_node=new ValueNode_TwoTone();
return value_node;
}
-sinfg::ValueNode_TwoTone::~ValueNode_TwoTone()
+synfig::ValueNode_TwoTone::~ValueNode_TwoTone()
{
unlink_all();
}
bool
-sinfg::ValueNode_TwoTone::set_lhs(ValueNode::Handle a)
+synfig::ValueNode_TwoTone::set_lhs(ValueNode::Handle a)
{
if(a->get_type()!=ValueBase::TYPE_COLOR)
return false;
}
bool
-sinfg::ValueNode_TwoTone::set_rhs(ValueNode::Handle b)
+synfig::ValueNode_TwoTone::set_rhs(ValueNode::Handle b)
{
if(b->get_type()!=ValueBase::TYPE_COLOR)
return false;
return true;
}
-sinfg::ValueBase
-sinfg::ValueNode_TwoTone::operator()(Time t)const
+synfig::ValueBase
+synfig::ValueNode_TwoTone::operator()(Time t)const
{
return Gradient((*ref_a)(t).get(Color()),(*ref_b)(t).get(Color()));
}
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file valuenode_twotone.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VALUENODE_TWOTONE_H
-#define __SINFG_VALUENODE_TWOTONE_H
+#ifndef __SYNFIG_VALUENODE_TWOTONE_H
+#define __SYNFIG_VALUENODE_TWOTONE_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
struct ValueNode_TwoTone : public LinkableValueNode
{
LinkableValueNode* create_new()const;
public:
- using sinfg::LinkableValueNode::get_link_vfunc;
+ using synfig::LinkableValueNode::get_link_vfunc;
- using sinfg::LinkableValueNode::set_link_vfunc;
+ using synfig::LinkableValueNode::set_link_vfunc;
static bool check_type(ValueBase::Type type);
static ValueNode_TwoTone* create(const ValueBase &x=ValueBase::TYPE_GRADIENT);
}; // END of class ValueNode_TwoTone
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file vector.h
** \brief Various discreet type definitions
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VECTOR_H
-#define __SINFG_VECTOR_H
+#ifndef __SYNFIG_VECTOR_H
+#define __SYNFIG_VECTOR_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
/*! \class Vector
** \todo writeme
-}; // END of namespace sinfg
+}; // END of namespace synfig
namespace std {
-inline sinfg::Vector::value_type
-abs(const sinfg::Vector &rhs)
+inline synfig::Vector::value_type
+abs(const synfig::Vector &rhs)
{ return rhs.mag(); }
}; // END of namespace std
_ETL_BEGIN_NAMESPACE
template <>
-class bezier_base<sinfg::Vector,float> : public std::unary_function<float,sinfg::Vector>
+class bezier_base<synfig::Vector,float> : public std::unary_function<float,synfig::Vector>
{
public:
- typedef sinfg::Vector value_type;
+ typedef synfig::Vector value_type;
typedef float time_type;
private:
- bezier_base<sinfg::Vector::value_type,time_type> bezier_x,bezier_y;
+ bezier_base<synfig::Vector::value_type,time_type> bezier_x,bezier_y;
value_type a,b,c,d;
value_type
operator()(time_type t)const
{
- return sinfg::Vector(bezier_x(t),bezier_y(t));
+ return synfig::Vector(bezier_x(t),bezier_y(t));
}
void evaluate(time_type t, value_type &f, value_type &df) const
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file version.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_VERSION_H
-#define __SINFG_VERSION_H
+#ifndef __SYNFIG_VERSION_H
+#define __SYNFIG_VERSION_H
/* === H E A D E R S ======================================================= */
/* === M A C R O S ========================================================= */
-/*! \def SINFG_VERSION
-** \brief Sinfg API Version
+/*! \def SYNFIG_VERSION
+** \brief Synfig API Version
**
-** The macro SINFG_VERSION can be set to ensure
+** The macro SYNFIG_VERSION can be set to ensure
** compile-time compatibility with future versions
-** of Sinfg. The first two digits are the major
+** of Synfig. The first two digits are the major
** version, the second two digits are the minor
** version, and the last two digits are the
** revision release.
*/
-#ifndef SINFG_VERSION
-#define SINFG_VERSION (006000)
+#ifndef SYNFIG_VERSION
+#define SYNFIG_VERSION (006000)
#endif
/*! Increment this value whenever
** the library changes in a way
** that breaks library compatibility
*/
-#define SINFG_LIBRARY_VERSION 47
+#define SYNFIG_LIBRARY_VERSION 47
/*! \writeme */
-#define SINFG_CHECK_VERSION() sinfg::check_version_(SINFG_LIBRARY_VERSION,sizeof(sinfg::Vector),sizeof(sinfg::Color),sizeof(sinfg::Canvas),sizeof(sinfg::Layer))
+#define SYNFIG_CHECK_VERSION() synfig::check_version_(SYNFIG_LIBRARY_VERSION,sizeof(synfig::Vector),sizeof(synfig::Color),sizeof(synfig::Canvas),sizeof(synfig::Layer))
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
//! Version checker \internal
/*! Checks to make sure that the library
** version matches with what the program
** was compiled against.
-** \see SINFG_CHECK_VERSION()
+** \see SYNFIG_CHECK_VERSION()
*/
extern bool check_version_(int v,int vec_size, int color_size,int canvas_size,int layer_size);
extern const char *get_build_time();
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file waypoint.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
ValueBase
Waypoint::get_value(const Time &t)const { return (*value_node)(t); }
-sinfg::GUID
+synfig::GUID
Waypoint::get_guid()const
{
return GUID::hasher(get_uid());
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file waypoint.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_WAYPOINT_H
-#define __SINFG_WAYPOINT_H
+#ifndef __SYNFIG_WAYPOINT_H
+#define __SYNFIG_WAYPOINT_H
/* === H E A D E R S ======================================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace sinfg {
+namespace synfig {
class ValueNode;
class GUID;
public:
- typedef sinfg::Interpolation Interpolation;
+ typedef synfig::Interpolation Interpolation;
class Model
{
typedef std::vector< Waypoint > WaypointList;
-}; // END of namespace sinfg
+}; // END of namespace synfig
/* === E N D =============================================================== */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file template.cpp
** \brief Template File
**
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file template.h
** \brief Template Header
**
/* === S T A R T =========================================================== */
-#ifndef __SINFG_TEMPLATE_H
-#define __SINFG_TEMPLATE_H
+#ifndef __SYNFIG_TEMPLATE_H
+#define __SYNFIG_TEMPLATE_H
/* === H E A D E R S ======================================================= */
-# $Header: /opt/voria/cvs/sinfg/src/tool/Makefile.am,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
+# $Header: /opt/voria/cvs/synfig/src/tool/Makefile.am,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
MAINTAINERCLEANFILES=Makefile.in
bin_PROGRAMS = synfig
synfig_SOURCES = main.cpp
-synfig_LDADD = -L../sinfg -lsinfg @SINFG_LIBS@
-synfig_CXXFLAGS = -lsinfg @SINFG_CFLAGS@
+synfig_LDADD = -L../synfig -lsynfig @SYNFIG_LIBS@
+synfig_CXXFLAGS = -lsynfig @SYNFIG_CFLAGS@
#synfig_LDFLAGS=-export-dynamic -dlopen self
#-dlopen ../modules/example/libexample.la
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
/*! \file main.cpp
-** \brief SINFG Tool
+** \brief SYNFIG Tool
**
** $Id: main.cpp,v 1.9 2005/01/23 04:41:10 darco Exp $
**
#include <ETL/clock>
#include <algorithm>
-#include <sinfg/loadcanvas.h>
-#include <sinfg/savecanvas.h>
-#include <sinfg/target_scanline.h>
-#include <sinfg/module.h>
-#include <sinfg/importer.h>
-#include <sinfg/layer.h>
-#include <sinfg/canvas.h>
-#include <sinfg/target.h>
-#include <sinfg/time.h>
-#include <sinfg/string.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/main.h>
-#include <sinfg/guid.h>
+#include <synfig/loadcanvas.h>
+#include <synfig/savecanvas.h>
+#include <synfig/target_scanline.h>
+#include <synfig/module.h>
+#include <synfig/importer.h>
+#include <synfig/layer.h>
+#include <synfig/canvas.h>
+#include <synfig/target.h>
+#include <synfig/time.h>
+#include <synfig/string.h>
+#include <synfig/paramdesc.h>
+#include <synfig/main.h>
+#include <synfig/guid.h>
#endif
using namespace std;
using namespace etl;
-using namespace sinfg;
+using namespace synfig;
/* === M A C R O S ========================================================= */
enum exit_code
{
- SINFGTOOL_OK =0,
- SINFGTOOL_FILENOTFOUND =1,
- SINFGTOOL_BORRED =2,
- SINFGTOOL_HELP =3,
- SINFGTOOL_UNKNOWNARGUMENT =4,
- SINFGTOOL_UNKNOWNERROR =5,
- SINFGTOOL_INVALIDTARGET =6,
- SINFGTOOL_RENDERFAILURE =7,
- SINFGTOOL_BLANK =8,
- SINFGTOOL_BADVERSION =9
+ SYNFIGTOOL_OK =0,
+ SYNFIGTOOL_FILENOTFOUND =1,
+ SYNFIGTOOL_BORRED =2,
+ SYNFIGTOOL_HELP =3,
+ SYNFIGTOOL_UNKNOWNARGUMENT =4,
+ SYNFIGTOOL_UNKNOWNERROR =5,
+ SYNFIGTOOL_INVALIDTARGET =6,
+ SYNFIGTOOL_RENDERFAILURE =7,
+ SYNFIGTOOL_BLANK =8,
+ SYNFIGTOOL_BADVERSION =9
};
#ifndef VERSION
#define VERSION "unknown"
-#define PACKAGE "sinfg-tool"
+#define PACKAGE "synfig-tool"
#endif
#ifdef DEFAULT_QUALITY
/* === M E T H O D S ======================================================= */
-class Progress : public sinfg::ProgressCallback
+class Progress : public synfig::ProgressCallback
{
const char *program;
}
};
-class RenderProgress : public sinfg::ProgressCallback
+class RenderProgress : public synfig::ProgressCallback
{
string taskname;
cout<<"GUID Test"<<endl;
for(int i=20;i;i--)
{
- cout<<sinfg::GUID().get_string()<<' '<<sinfg::GUID().get_string()<<endl;
+ cout<<synfig::GUID().get_string()<<' '<<synfig::GUID().get_string()<<endl;
}
}
for(next=arg_list.begin(),iter=next++;iter!=arg_list.end();iter=next++)
{
if(*iter == "--")
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
if(*iter == "--signal-test")
{
signal_test();
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "--guid-test")
{
guid_test();
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
{
display_help(1);
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "--info")
cout<<" with Borland Turbo C++ "<<(__TCPLUSPLUS__>>8)<<'.'<<((__TCPLUSPLUS__&255)>>4)<<'.'<<(__TCPLUSPLUS__&15);
#endif
- cout<<endl<<SINFG_COPYRIGHT<<endl;
+ cout<<endl<<SYNFIG_COPYRIGHT<<endl;
cout<<endl;
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "--layers")
{
Progress p(PACKAGE);
- sinfg::Main sinfg_main(dirname(progname),&p);
- sinfg::Layer::Book::iterator iter=sinfg::Layer::book().begin();
- for(;iter!=sinfg::Layer::book().end();iter++)
+ synfig::Main synfig_main(dirname(progname),&p);
+ synfig::Layer::Book::iterator iter=synfig::Layer::book().begin();
+ for(;iter!=synfig::Layer::book().end();iter++)
cout<<iter->first<<endl;
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "--layer-info")
{
Progress p(PACKAGE);
- sinfg::Main sinfg_main(dirname(progname),&p);
+ synfig::Main synfig_main(dirname(progname),&p);
iter=next++;
- Layer::Handle layer=sinfg::Layer::create(*iter);
+ Layer::Handle layer=synfig::Layer::create(*iter);
cout<<"Layer Name: "<<layer->get_name()<<endl;
cout<<"Localized Layer Name: "<<layer->get_local_name()<<endl;
cout<<"Version: "<<layer->get_version()<<endl;
cout<<"\tHint: "<<vocab.front().get_hint()<<endl;
}
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "--modules")
{
Progress p(PACKAGE);
- sinfg::Main sinfg_main(dirname(progname),&p);
- sinfg::Module::Book::iterator iter=sinfg::Module::book().begin();
- for(;iter!=sinfg::Module::book().end();iter++)
+ synfig::Main synfig_main(dirname(progname),&p);
+ synfig::Module::Book::iterator iter=synfig::Module::book().begin();
+ for(;iter!=synfig::Module::book().end();iter++)
cout<<iter->first<<endl;
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "--targets")
{
Progress p(PACKAGE);
- sinfg::Main sinfg_main(dirname(progname),&p);
- sinfg::Target::Book::iterator iter=sinfg::Target::book().begin();
- for(;iter!=sinfg::Target::book().end();iter++)
+ synfig::Main synfig_main(dirname(progname),&p);
+ synfig::Target::Book::iterator iter=synfig::Target::book().begin();
+ for(;iter!=synfig::Target::book().end();iter++)
cout<<iter->first<<endl;
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "--valuenodes")
{
Progress p(PACKAGE);
- sinfg::Main sinfg_main(dirname(progname),&p);
- sinfg::LinkableValueNode::Book::iterator iter=sinfg::LinkableValueNode::book().begin();
- for(;iter!=sinfg::LinkableValueNode::book().end();iter++)
+ synfig::Main synfig_main(dirname(progname),&p);
+ synfig::LinkableValueNode::Book::iterator iter=synfig::LinkableValueNode::book().begin();
+ for(;iter!=synfig::LinkableValueNode::book().end();iter++)
cout<<iter->first<<endl;
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "--importers")
{
Progress p(PACKAGE);
- sinfg::Main sinfg_main(dirname(progname),&p);
- sinfg::Importer::Book::iterator iter=sinfg::Importer::book().begin();
- for(;iter!=sinfg::Importer::book().end();iter++)
+ synfig::Main synfig_main(dirname(progname),&p);
+ synfig::Importer::Book::iterator iter=synfig::Importer::book().begin();
+ for(;iter!=synfig::Importer::book().end();iter++)
cout<<iter->first<<endl;
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "--version")
arg_list.erase(iter);
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "--license")
{
cerr<<PACKAGE<<" "<<VERSION<<endl;
- cout<<SINFG_COPYRIGHT<<endl<<endl;
+ cout<<SYNFIG_COPYRIGHT<<endl<<endl;
cerr<<"\
** This software and associated documentation\n\
** are CONFIDENTIAL and PROPRIETARY property of\n\
** copyright holder. " << endl << endl;
arg_list.erase(iter);
- return SINFGTOOL_HELP;
+ return SYNFIGTOOL_HELP;
}
if(*iter == "-v")
}
}
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
}
int extract_arg_cluster(arg_list_t &arg_list,arg_list_t &cluster)
if(*iter->begin() != '-')
{
//cerr<<*iter->begin()<<"-----------"<<endl;
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
}
if(
arg_list.erase(iter);
}
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
}
int extract_RendDesc(arg_list_t &arg_list,RendDesc &desc)
}
if(*iter=="-g")
{
- sinfg::warning("Gamma argument is currently ignored");
+ synfig::warning("Gamma argument is currently ignored");
//arg_list.erase(iter);
//iter=next++;
//desc.set_gamma(Gamma(atof(iter->c_str())));
}
if(span)
desc.set_span(span);
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
}
int extract_quality(arg_list_t &arg_list,int &quality)
}
}
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
}
int extract_threads(arg_list_t &arg_list,int &threads)
}
}
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
}
int extract_target(arg_list_t &arg_list,string &type)
}
}
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
}
int extract_append(arg_list_t &arg_list,string &filename)
}
}
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
}
int extract_outfile(arg_list_t &arg_list,string &outfile)
{
arg_list_t::iterator iter, next;
- int ret=SINFGTOOL_FILENOTFOUND;
+ int ret=SYNFIGTOOL_FILENOTFOUND;
outfile.clear();
for(next=arg_list.begin(),iter=next++;iter!=arg_list.end();iter=next++)
iter=next++;
outfile=*iter;
arg_list.erase(iter);
- ret=SINFGTOOL_OK;
+ ret=SYNFIGTOOL_OK;
}
}
}
}
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
}
/* === M E T H O D S ======================================================= */
progname=argv[0];
Progress p(argv[0]);
- if(!SINFG_CHECK_VERSION())
+ if(!SYNFIG_CHECK_VERSION())
{
- cerr<<_("FATAL: Sinfg Version Mismatch")<<endl;
- return SINFGTOOL_BADVERSION;
+ cerr<<_("FATAL: Synfig Version Mismatch")<<endl;
+ return SYNFIGTOOL_BADVERSION;
}
if(argc==1)
{
display_help(0);
- return SINFGTOOL_BLANK;
+ return SYNFIGTOOL_BLANK;
}
for(i=1;i<argc;i++)
return i;
VERBOSE_OUT(1)<<_("verbosity set to ")<<verbosity<<endl;
- sinfg::Main sinfg_main(dirname(progname),&p);
+ synfig::Main synfig_main(dirname(progname),&p);
{
arg_list_t defaults, imageargs;
}
catch(std::length_error)
{
- sinfg::warning("Length error caught when attempting to figure out target name");
+ synfig::warning("Length error caught when attempting to figure out target name");
}
// If the target type is STILL not yet defined, then
VERBOSE_OUT(4)<<"outfile_name="<<job_list.front().outfilename<<endl;
VERBOSE_OUT(4)<<_("Creating the target...")<<endl;
- job_list.front().target=sinfg::Target::create(target_name,job_list.front().outfilename);
+ job_list.front().target=synfig::Target::create(target_name,job_list.front().outfilename);
if(target_name=="sif")
{
for(;arg_list.size();arg_list.pop_front())
cerr<<' '<<arg_list.front();
cerr<<endl;
- return SINFGTOOL_UNKNOWNARGUMENT;
+ return SYNFIGTOOL_UNKNOWNARGUMENT;
}
if(!job_list.size())
{
cerr<<_("Nothing to do!")<<endl;
- return SINFGTOOL_BORRED;
+ return SYNFIGTOOL_BORRED;
}
for(;job_list.size();job_list.pop_front())
if(!job_list.front().target->render(&p))
{
cerr<<"Render Failure."<<endl;
- return SINFGTOOL_RENDERFAILURE;
+ return SYNFIGTOOL_RENDERFAILURE;
}
if(print_benchmarks)
{
if(!save_canvas(job_list.front().outfilename,job_list.front().canvas))
{
cerr<<"Render Failure."<<endl;
- return SINFGTOOL_RENDERFAILURE;
+ return SYNFIGTOOL_RENDERFAILURE;
}
}
}
VERBOSE_OUT(1)<<_("Done.")<<endl;
- return SINFGTOOL_OK;
+ return SYNFIGTOOL_OK;
}
SetOutPath "$INSTDIR\bin"\r
\r
; Put file there\r
- File "src\tool\.libs\sinfg.exe"\r
+ File "src\tool\.libs\synfig.exe"\r
\r
SectionEnd\r
\r
Section "un.Synfig Tool Uninstall"\r
- Delete "$INSTDIR\bin\sinfg.exe"\r
+ Delete "$INSTDIR\bin\synfig.exe"\r
RMDir "$INSTDIR"\r
SectionEnd\r
\r
mandir=@mandir@
includedir=@includedir@
-LIBS="@SINFG_LIBS@"
+LIBS="@SYNFIG_LIBS@"
VERSION=@VERSION@
PACKAGE=@PACKAGE@
usage()
{
cat <<EOF
-Usage: sinfg-config [OPTION]...
+Usage: synfig-config [OPTION]...
Generic options
- --version print installed version of sinfg.
+ --version print installed version of synfig.
--help display this help and exit.
Compilation support options
#define PROJECT_BUILDER 1
/* Define to the full name of this package. */
-#define PACKAGE "sinfg"
+#define PACKAGE "synfig"
/* Define to the version of this package. */
#define VERSION "0.60.05-mac"
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
-#define SINFG_LTDL_NO_STATIC
+#define SYNFIG_LTDL_NO_STATIC
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
-PROJECT_NAME = "sinfg"
+PROJECT_NAME = "synfig"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = src/sinfg
+INPUT = src/synfig
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed.
-PREDEFINED = SINFG_NO_DEPRECATED DOXYGEN_SKIP
+PREDEFINED = SYNFIG_NO_DEPRECATED DOXYGEN_SKIP
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir=@sinfgincludedir@
+includedir=@synfigincludedir@
-Name: sinfg
-Description: Sinfg Library and Associated Tools
+Name: synfig
+Description: Synfig Core
Requires: @CONFIG_DEPS@
-Version: 0.60.05-CVS
+Version: 0.61.00-20
Libs: -L${libdir} @CONFIG_LIBS@
-Cflags: @CONFIG_CFLAGS@ -I@sinfgincludedir@
+Cflags: @CONFIG_CFLAGS@ -I@synfigincludedir@
File "C:\GTK\bin\libfreetype-6.dll"
; Put file there
-; File "sinfg_modules.conf"
+; File "synfig_modules.conf"
CreateDirectory "$INSTDIR\etc"
- Delete $INSTDIR\etc\sinfg_modules.conf
+ Delete $INSTDIR\etc\synfig_modules.conf
; Write the installation path into the registry
; WriteRegStr HKLM "Software\Voria_@PACKAGE_TARNAME@" "Install_Dir" "$INSTDIR"
; DeleteRegKey HKLM "Software\Voria_@PACKAGE_TARNAME@"
; Remove files and uninstaller
- ;Delete $INSTDIR\sinfg.exe
+ ;Delete $INSTDIR\synfig.exe
Delete $INSTDIR\uninstall-@PACKAGE_TARNAME@.exe
- Delete $INSTDIR\etc\sinfg_modules.conf
+ Delete $INSTDIR\etc\synfig_modules.conf
RMDir $INSTDIR\bin
RMDir $INSTDIR\etc
SectionEnd
-!include @srcdir@\src\sinfg\sinfg.nsh
+!include @srcdir@\src\synfig\synfig.nsh
!include @srcdir@\src\tool\tool.nsh
Section "Examples"