diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
commit | cca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch) | |
tree | 146f39ded1c938019e1ed42d30923c2ac9e86789 /src/trace/autotrace/inkscape-autotrace.h | |
parent | Initial commit. (diff) | |
download | inkscape-upstream.tar.xz inkscape-upstream.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
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 | 101 |
1 files changed, 101 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..f12eb35 --- /dev/null +++ b/src/trace/autotrace/inkscape-autotrace.h @@ -0,0 +1,101 @@ +// 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_AUTOTRACE_H__ +#define __INKSCAPE_AUTOTRACE_H__ + +#include "3rdparty/autotrace/autotrace.h" +#include <trace/trace.h> + +namespace Inkscape { + +namespace Trace { + +namespace Autotrace { +enum TraceType { TRACE_CENTERLINE, TRACE_OUTLINE }; + +class AutotraceTracingEngine : public TracingEngine { + + public: + /** + * + */ + AutotraceTracingEngine(); + + /** + * + */ + ~AutotraceTracingEngine() override; + + + /** + * Sets/gets parameters + */ + // TODO + + /** + * This is the working method of this implementing class, and all + * implementing classes. Take a GdkPixbuf, trace it, and + * return the path data that is compatible with the d="" attribute + * of an SVG <path> element. + */ + std::vector<TracingEngineResult> trace(Glib::RefPtr<Gdk::Pixbuf> pixbuf) override; + + /** + * Abort the thread that is executing getPathDataFromPixbuf() + */ + void abort() override; + + /** + * + */ + Glib::RefPtr<Gdk::Pixbuf> preview(Glib::RefPtr<Gdk::Pixbuf> pixbuf); + + /** + * + */ + int keepGoing; + + //private: + // autotrace_param_t *autotraceParams; + TraceType traceType; + at_fitting_opts_type *opts; + + //## do I invert at the end? + bool invert; + +}; // class AutotraceTracingEngine + + + +} // namespace Autotrace +} // namespace Trace +} // namespace Inkscape + + +#endif //__INKSCAPE_POTRACE_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 : |