|
Ankit Kumar Dwivedi |
5c7d6a |
/* === S Y N F I G ========================================================= */
|
|
Ankit Kumar Dwivedi |
5c7d6a |
/*! \file vectorization.h
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** \brief Vectorization Action File
|
|
Ankit Kumar Dwivedi |
5c7d6a |
**
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** $Id$
|
|
Ankit Kumar Dwivedi |
5c7d6a |
**
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** \legal
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
|
|
Ankit Kumar Dwivedi |
5c7d6a |
**
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** This package is free software; you can redistribute it and/or
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** modify it under the terms of the GNU General Public License as
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** published by the Free Software Foundation; either version 2 of
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** the License, or (at your option) any later version.
|
|
Ankit Kumar Dwivedi |
5c7d6a |
**
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** This package is distributed in the hope that it will be useful,
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** General Public License for more details.
|
|
Ankit Kumar Dwivedi |
5c7d6a |
** \endlegal
|
|
Ankit Kumar Dwivedi |
5c7d6a |
*/
|
|
Ankit Kumar Dwivedi |
5c7d6a |
/* ========================================================================= */
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
/* === S T A R T =========================================================== */
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
#ifndef __SYNFIG_APP_ACTION_VECTORIZATION_H
|
|
Ankit Kumar Dwivedi |
5c7d6a |
#define __SYNFIG_APP_ACTION_VECTORIZATION_H
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
/* === H E A D E R S ======================================================= */
|
|
Ankit Kumar Dwivedi |
5c7d6a |
#include <synfigapp action.h=""></synfigapp>
|
|
Ankit Kumar Dwivedi |
5c7d6a |
#include <synfig layer.h=""></synfig>
|
|
Ankit Kumar Dwivedi |
91fe33 |
#include "vectorizer/centerlinevectorizer.h"
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
/* === M A C R O S ========================================================= */
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
/* === T Y P E D E F S ===================================================== */
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
/* === C L A S S E S & S T R U C T S ======================================= */
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
namespace synfigapp {
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
class Instance;
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
namespace Action {
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
class Vectorization :
|
|
Ankit Kumar Dwivedi |
a1d71f |
public Undoable,
|
|
Ankit Kumar Dwivedi |
a1d71f |
public CanvasSpecific
|
|
Ankit Kumar Dwivedi |
5c7d6a |
{
|
|
Ankit Kumar Dwivedi |
5c7d6a |
private:
|
|
Ankit Kumar Dwivedi |
90515f |
synfig::Layer::Handle layer,reference_layer, new_layer;
|
|
Ankit Kumar Dwivedi |
7b3701 |
synfig::String v_mode;
|
|
Ankit Kumar Dwivedi |
7b3701 |
int threshold, penalty, despeckling, maxthickness;
|
|
Ankit Kumar Dwivedi |
b2346e |
bool pparea, addborder,isOutline;
|
|
Ankit Kumar Dwivedi |
7799cf |
studio::CenterlineConfiguration getCenterlineConfiguration() const;
|
|
Ankit Kumar Dwivedi |
7d9190 |
studio::NewOutlineConfiguration getOutlineConfiguration() const;
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
7d9190 |
studio::VectorizerConfiguration *getCurrentConfiguration() const {
|
|
Ankit Kumar Dwivedi |
f0cb07 |
return isOutline ? (studio::VectorizerConfiguration *)new studio::NewOutlineConfiguration(getOutlineConfiguration())
|
|
Ankit Kumar Dwivedi |
f0cb07 |
: (studio::VectorizerConfiguration *)new studio::CenterlineConfiguration(getCenterlineConfiguration());
|
|
Ankit Kumar Dwivedi |
7b3701 |
}
|
|
Ankit Kumar Dwivedi |
7b3701 |
|
|
Ankit Kumar Dwivedi |
7b3701 |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
public:
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
Vectorization();
|
|
Ankit Kumar Dwivedi |
896d3a |
static ParamVocab get_param_vocab();
|
|
Ankit Kumar Dwivedi |
896d3a |
static bool is_candidate(const ParamList &x);
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
896d3a |
virtual bool set_param(const synfig::String& name, const Param &);
|
|
Ankit Kumar Dwivedi |
896d3a |
virtual bool is_ready()const;
|
|
Ankit Kumar Dwivedi |
896d3a |
|
|
Ankit Kumar Dwivedi |
896d3a |
virtual void perform();
|
|
Ankit Kumar Dwivedi |
896d3a |
virtual void undo();
|
|
Ankit Kumar Dwivedi |
896d3a |
|
|
Ankit Kumar Dwivedi |
896d3a |
ACTION_MODULE_EXT
|
|
Ankit Kumar Dwivedi |
5c7d6a |
};
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
}; // END of namespace action
|
|
Ankit Kumar Dwivedi |
5c7d6a |
}; // END of namespace studio
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
/* === E N D =============================================================== */
|
|
Ankit Kumar Dwivedi |
5c7d6a |
|
|
Ankit Kumar Dwivedi |
5c7d6a |
#endif
|