diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:50:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:50:49 +0000 |
commit | c853ffb5b2f75f5a889ed2e3ef89b818a736e87a (patch) | |
tree | 7d13a0883bb7936b84d6ecdd7bc332b41ed04bee /src/trace/autotrace/inkscape-autotrace.h | |
parent | Initial commit. (diff) | |
download | inkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.tar.xz inkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.zip |
Adding upstream version 1.3+ds.upstream/1.3+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/trace/autotrace/inkscape-autotrace.h')
-rw-r--r-- | src/trace/autotrace/inkscape-autotrace.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/trace/autotrace/inkscape-autotrace.h b/src/trace/autotrace/inkscape-autotrace.h new file mode 100644 index 0000000..a117592 --- /dev/null +++ b/src/trace/autotrace/inkscape-autotrace.h @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/** @file + * This is the C++ glue between Inkscape and Autotrace + *//* + * + * Authors: + * Marc Jeanmougin + * + * Copyright (C) 2018 Authors + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + * + * Autotrace is available at http://github.com/autotrace/autotrace. + * + */ +#ifndef INKSCAPE_TRACE_AUTOTRACE_H +#define INKSCAPE_TRACE_AUTOTRACE_H + +#include "trace/trace.h" +using at_fitting_opts_type = struct _at_fitting_opts_type; + +namespace Inkscape { +namespace Trace { +namespace Autotrace { + +class AutotraceTracingEngine final + : public TracingEngine +{ +public: + AutotraceTracingEngine(); + ~AutotraceTracingEngine() override; + + TraceResult trace(Glib::RefPtr<Gdk::Pixbuf> const &pixbuf, Async::Progress<double> &progress) override; + Glib::RefPtr<Gdk::Pixbuf> preview(Glib::RefPtr<Gdk::Pixbuf> const &pixbuf) override; + + void setColorCount(unsigned); + void setCenterLine(bool); + void setPreserveWidth(bool); + void setFilterIterations(unsigned); + void setErrorThreshold(float); + +private: + at_fitting_opts_type *opts; +}; + +} // namespace Autotrace +} // namespace Trace +} // namespace Inkscape + +#endif // INKSCAPE_TRACE_AUTOTRACE_H + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : |