blob: f12eb35d8c92a516f33b85f03ad69c844ce85cd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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 :
|