X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftags%2Fstable%2Fsrc%2Ftool%2Fmain.cpp;fp=synfig-core%2Ftags%2Fstable%2Fsrc%2Ftool%2Fmain.cpp;h=0000000000000000000000000000000000000000;hb=6fa8f2f38d4b0b35f8539bf94e27ae27015c7689;hp=01f4b645b3797a701cde09c18f85022ebf584d16;hpb=47fce282611fbba1044921d22ca887f9b53ad91a;p=synfig.git diff --git a/synfig-core/tags/stable/src/tool/main.cpp b/synfig-core/tags/stable/src/tool/main.cpp deleted file mode 100644 index 01f4b64..0000000 --- a/synfig-core/tags/stable/src/tool/main.cpp +++ /dev/null @@ -1,1421 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file tool/main.cpp -** \brief SYNFIG Tool -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#ifdef ENABLE_NLS -#undef _ -#define _(x) gettext(x) -#else -#undef _ -#define _(x) (x) -#endif - -enum exit_code -{ - SYNFIGTOOL_OK = 0, - SYNFIGTOOL_FILENOTFOUND = 1, - SYNFIGTOOL_BORED = 2, - SYNFIGTOOL_HELP = 3, - SYNFIGTOOL_UNKNOWNARGUMENT = 4, - SYNFIGTOOL_UNKNOWNERROR = 5, - SYNFIGTOOL_INVALIDTARGET = 6, - SYNFIGTOOL_RENDERFAILURE = 7, - SYNFIGTOOL_BLANK = 8, - SYNFIGTOOL_BADVERSION = 9, - SYNFIGTOOL_MISSINGARGUMENT =10 -}; - -#ifndef VERSION -#define VERSION "unknown" -#define PACKAGE "synfig-tool" -#endif - -#ifdef DEFAULT_QUALITY -#undef DEFAULT_QUALITY -#endif - -#define DEFAULT_QUALITY 2 -#define VERBOSE_OUT(x) if(verbosity>=(x))std::cerr - -/* === G L O B A L S ======================================================= */ - -const char *progname; -int verbosity=0; -bool be_quiet=false; -bool print_benchmarks=false; - -/* === M E T H O D S ======================================================= */ - -class Progress : public synfig::ProgressCallback -{ - const char *program; - -public: - - Progress(const char *name):program(name) { } - - virtual bool - task(const String &task) - { - VERBOSE_OUT(1)<=60) - minutes++,seconds-=60; - while(minutes>=60) - hours++,minutes-=60; - while(hours>=24) - days++,hours-=24; - while(days>=7) - weeks++,days-=7; - - cerr<=-time/(h-clk_scanline) ) - cerr<<">"; - */ - if(delta>=0 && clk()>4.0 && scanline>clk_scanline+200) - { - //cerr<<"reset"< arg_list_t; -typedef list job_list_t; - -void guid_test() -{ - cout<<"GUID Test"< sig; - sigc::connection conn; - cout<<"Signal Test"<",_("Specify output target (Default:unknown)")); - Argument("-w","",_("Set the image width (Use zero for file default)")); - Argument("-h","",_("Set the image height (Use zero for file default)")); - Argument("-s","",_("Set the diagonal size of image window (Span)")); - Argument("-a","<1...30>",_("Set antialias amount for parametric renderer.")); - Argument("-Q","<0...10>",strprintf(_("Specify image quality for accelerated renderer (default=%d)"),DEFAULT_QUALITY).c_str()); - Argument("-g","",_("Gamma (default=2.2)")); - Argument("-v",NULL,_("Verbose Output (add more for more verbosity)")); - Argument("-q",NULL,_("Quiet mode (No progress/time-remaining display)")); - Argument("-c","",_("Render the canvas with the given id instead of the root.")); - Argument("-o","",_("Specify output filename")); - Argument("-T","<# of threads>",_("Enable multithreaded renderer using specified # of threads")); - Argument("-b",NULL,_("Print Benchmarks")); - Argument("--fps","",_("Set the frame rate")); - Argument("--time","