summaryrefslogtreecommitdiffstats
path: root/src/live_effects/fill-conversion.h
blob: e58801993fbecad989f59e4770f6daca67e73b96 (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
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef INKSCAPE_FILLCONVERSION_H
#define INKSCAPE_FILLCONVERSION_H

/*
 * Copyright (C) Liam P White 2020
 *
 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
 */

class SPShape;

namespace Inkscape {
namespace LivePathEffect {

/**
 * Prepares a SPShape's fill and stroke for use in a path effect by setting
 * the existing stroke properties into the shape's fill, and setting the
 * existing fill properties into a new linked fill item which follows the
 * old shape.
 */
void lpe_shape_convert_stroke_and_fill(SPShape *shape);

/**
 * Applies the fill of the SPShape to its stroke, sets the stroke width to the
 * provided parameter, and potentially removes a linked fill, copying its
 * properties to the fill of the shape. Essentially undoes the result of the
 * above function.
 */
void lpe_shape_revert_stroke_and_fill(SPShape *shape, double width);

}
}

#endif

/*
  Local Variables:
  mode:c++
  c-file-style:"stroustrup"
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
  indent-tabs-mode:nil
  fill-column:99
  End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :