|
Ankit Kumar Dwivedi |
f06309 |
/* === S Y N F I G ========================================================= */
|
|
Ankit Kumar Dwivedi |
1bc957 |
/*! \file dialog/vectorizersettings.h
|
|
Ankit Kumar Dwivedi |
f06309 |
**
|
|
Ankit Kumar Dwivedi |
f06309 |
** $Id$
|
|
Ankit Kumar Dwivedi |
f06309 |
**
|
|
Ankit Kumar Dwivedi |
f06309 |
** \legal
|
|
Ankit Kumar Dwivedi |
f06309 |
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
|
|
Ankit Kumar Dwivedi |
f06309 |
** Copyright (c) 2007 Chris Moore
|
|
Ankit Kumar Dwivedi |
f06309 |
**
|
|
Ankit Kumar Dwivedi |
f06309 |
** This package is free software; you can redistribute it and/or
|
|
Ankit Kumar Dwivedi |
f06309 |
** modify it under the terms of the GNU General Public License as
|
|
Ankit Kumar Dwivedi |
f06309 |
** published by the Free Software Foundation; either version 2 of
|
|
Ankit Kumar Dwivedi |
f06309 |
** the License, or (at your option) any later version.
|
|
Ankit Kumar Dwivedi |
f06309 |
**
|
|
Ankit Kumar Dwivedi |
f06309 |
** This package is distributed in the hope that it will be useful,
|
|
Ankit Kumar Dwivedi |
f06309 |
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Ankit Kumar Dwivedi |
f06309 |
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Ankit Kumar Dwivedi |
f06309 |
** General Public License for more details.
|
|
Ankit Kumar Dwivedi |
f06309 |
** \endlegal
|
|
Ankit Kumar Dwivedi |
f06309 |
*/
|
|
Ankit Kumar Dwivedi |
f06309 |
/* ========================================================================= */
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
/* === S T A R T =========================================================== */
|
|
Ankit Kumar Dwivedi |
7c1f39 |
#ifndef __SYNFIG_GTKMM_DIALOG_VECTORIZERSETTINGS_H
|
|
Ankit Kumar Dwivedi |
7c1f39 |
#define __SYNFIG_GTKMM_DIALOG_VECTORIZERSETTINGS_H
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
/* === H E A D E R S ======================================================= */
|
|
Ankit Kumar Dwivedi |
a2ee61 |
#include <etl handle=""></etl>
|
|
Ankit Kumar Dwivedi |
f06309 |
#include <vector></vector>
|
|
Ankit Kumar Dwivedi |
6a3e32 |
#include <unordered_map> </unordered_map>
|
|
Ankit Kumar Dwivedi |
f71999 |
#include <gtkmm.h></gtkmm.h>
|
|
Ankit Kumar Dwivedi |
f71999 |
// #include <gtkmm grid.h=""></gtkmm>
|
|
Ankit Kumar Dwivedi |
f71999 |
// #include <gtkmm dialog.h=""></gtkmm>
|
|
Ankit Kumar Dwivedi |
f71999 |
// #include <gtkmm switch.h=""></gtkmm>
|
|
Ankit Kumar Dwivedi |
f71999 |
// #include <gtkmm tooltip.h=""></gtkmm>
|
|
Ankit Kumar Dwivedi |
f71999 |
// #include <gtkmm table.h=""></gtkmm>
|
|
Ankit Kumar Dwivedi |
f71999 |
// #include <gtkmm entry.h=""></gtkmm>
|
|
Ankit Kumar Dwivedi |
f71999 |
// #include <gtkmm adjustment.h=""></gtkmm>
|
|
Ankit Kumar Dwivedi |
f71999 |
// #include <gtkmm spinbutton.h=""></gtkmm>
|
|
Ankit Kumar Dwivedi |
f71999 |
// #include <gtkmm checkbutton.h=""></gtkmm>
|
|
Ankit Kumar Dwivedi |
f71999 |
// #include <gtkmm comboboxtext.h=""></gtkmm>
|
|
Ankit Kumar Dwivedi |
f06309 |
#include <synfig string.h=""></synfig>
|
|
Ankit Kumar Dwivedi |
b2346e |
#include <synfigapp canvasinterface.h=""></synfigapp>
|
|
Ankit Kumar Dwivedi |
a2ee61 |
#include <synfig layer_bitmap.h="" layers=""></synfig>
|
|
Ankit Kumar Dwivedi |
90515f |
#include <synfig layer_pastecanvas.h="" layers=""></synfig>
|
|
Ankit Kumar Dwivedi |
8a765d |
#include "instance.h"
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
/* === M A C R O S ========================================================= */
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
/* === T Y P E D E F S ===================================================== */
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
/* === C L A S S E S & S T R U C T S ======================================= */
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
namespace studio
|
|
Ankit Kumar Dwivedi |
f06309 |
{
|
|
Ankit Kumar Dwivedi |
f06309 |
class VectorizerSettings : public Gtk::Dialog
|
|
Ankit Kumar Dwivedi |
f06309 |
{
|
|
Ankit Kumar Dwivedi |
f06309 |
Glib::RefPtr<gtk::adjustment> adjustment_accuracy;</gtk::adjustment>
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::SpinButton entry_accuracy;
|
|
Ankit Kumar Dwivedi |
f06309 |
Glib::RefPtr<gtk::adjustment> adjustment_accuracy2;</gtk::adjustment>
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::SpinButton entry_accuracy2;
|
|
Ankit Kumar Dwivedi |
f06309 |
Glib::RefPtr<gtk::adjustment> adjustment_threshold;</gtk::adjustment>
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::SpinButton entry_threshold;
|
|
Ankit Kumar Dwivedi |
f06309 |
Glib::RefPtr<gtk::adjustment> adjustment_despeckling;</gtk::adjustment>
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::SpinButton entry_despeckling;
|
|
Ankit Kumar Dwivedi |
f06309 |
Glib::RefPtr<gtk::adjustment> adjustment_despeckling2;</gtk::adjustment>
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::SpinButton entry_despeckling2;
|
|
Ankit Kumar Dwivedi |
f06309 |
Glib::RefPtr<gtk::adjustment> adjustment_maxthickness;</gtk::adjustment>
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::SpinButton entry_maxthickness;
|
|
Ankit Kumar Dwivedi |
a8ab53 |
|
|
Ankit Kumar Dwivedi |
f06309 |
Glib::RefPtr<gtk::adjustment> adjustment_radius;</gtk::adjustment>
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::SpinButton entry_radius;
|
|
Ankit Kumar Dwivedi |
f06309 |
Glib::RefPtr<gtk::adjustment> adjustment_adherence;</gtk::adjustment>
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::SpinButton entry_adherence;
|
|
Ankit Kumar Dwivedi |
f06309 |
Glib::RefPtr<gtk::adjustment> adjustment_angle;</gtk::adjustment>
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::SpinButton entry_angle;
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::Switch toggle_pparea;
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::Switch toggle_pparea2;
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::Switch toggle_add_border;
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::Grid *Outline_setting_grid = manage(new Gtk::Grid());
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::Grid *Centerline_setting_grid = manage(new Gtk::Grid());
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f71999 |
Gtk::Separator Separator;
|
|
Ankit Kumar Dwivedi |
f71999 |
|
|
Ankit Kumar Dwivedi |
f06309 |
Gtk::ComboBoxText comboboxtext_mode;
|
|
Ankit Kumar Dwivedi |
989a09 |
const etl::handle<synfig::layer_bitmap> layer_bitmap_;</synfig::layer_bitmap>
|
|
Ankit Kumar Dwivedi |
90515f |
etl::handle<synfig::layer> reference_layer_;</synfig::layer>
|
|
Ankit Kumar Dwivedi |
8a765d |
const etl::handle<instance> instance;</instance>
|
|
Ankit Kumar Dwivedi |
6a3e32 |
std::unordered_map <std::string,int>* config_map;</std::string,int>
|
|
Ankit Kumar Dwivedi |
c5cc5d |
|
|
Ankit Kumar Dwivedi |
f06309 |
public:
|
|
Ankit Kumar Dwivedi |
c955dd |
|
|
ankit-kumar-dwivedi |
16a7cf |
bool isOutline;
|
|
Ankit Kumar Dwivedi |
8a765d |
VectorizerSettings(Gtk::Window& parent, etl::handle<synfig::layer_bitmap> my_layer_bitmap,</synfig::layer_bitmap>
|
|
ankit-kumar-dwivedi |
16a7cf |
etl::handle<instance> selected_instance,std::unordered_map <std::string,int>& configmap,etl::handle<synfig::layer> reference_layer);</synfig::layer></std::string,int></instance>
|
|
Ankit Kumar Dwivedi |
f06309 |
~VectorizerSettings();
|
|
Ankit Kumar Dwivedi |
2268e3 |
void set_progress(float value);
|
|
Ankit Kumar Dwivedi |
708a57 |
|
|
Ankit Kumar Dwivedi |
b2346e |
// CenterlineConfiguration getCenterlineConfiguration() const;
|
|
Ankit Kumar Dwivedi |
b2346e |
// NewOutlineConfiguration getOutlineConfiguration(double weight) const;
|
|
Ankit Kumar Dwivedi |
c955dd |
|
|
Ankit Kumar Dwivedi |
b2346e |
// void doVectorize(const VectorizerConfiguration &conf);
|
|
Ankit Kumar Dwivedi |
0944d7 |
|
|
Ankit Kumar Dwivedi |
b2346e |
// VectorizerConfiguration *getCurrentConfiguration(double weight) const {
|
|
Ankit Kumar Dwivedi |
b2346e |
// return isOutline ? (VectorizerConfiguration *)new NewOutlineConfiguration(getOutlineConfiguration(weight))
|
|
Ankit Kumar Dwivedi |
b2346e |
// : (VectorizerConfiguration *)new CenterlineConfiguration(getCenterlineConfiguration());
|
|
Ankit Kumar Dwivedi |
b2346e |
// }
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
private:
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_comboboxtext_mode_changed();
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_threshold_changed();
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_accuracy_changed();
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_despeckling_changed();
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_maxthickness_changed();
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_tcalibration_start_changed();
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_tcalibration_end_changed();
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_pparea_toggle();
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_add_border_toggle();
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_convert_pressed();
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_cancel_pressed();
|
|
Ankit Kumar Dwivedi |
6a3e32 |
void savecurrconfig();
|
|
Ankit Kumar Dwivedi |
f06309 |
void on_finished();
|
|
Ankit Kumar Dwivedi |
f06309 |
}; // END of class VectorizerSettings
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
}; // END of namespace studio
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
f06309 |
/* === E N D =============================================================== */
|
|
Ankit Kumar Dwivedi |
f06309 |
|
|
Ankit Kumar Dwivedi |
7c1f39 |
#endif
|
|
Ankit Kumar Dwivedi |
f06309 |
|