Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-mesh-gradient.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
/*
5 * Authors: see git history
6 *
7 * Copyright (C) 2018 Authors
8 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
9 */
10#ifndef SP_MESH_GRADIENT_H
11#define SP_MESH_GRADIENT_H
12
17#include "svg/svg-length.h"
18#include "sp-gradient.h"
19
21class SPMeshGradient final : public SPGradient {
22public:
24 ~SPMeshGradient() override;
25 int tag() const override { return tag_of<decltype(*this)>; }
26
27 SVGLength x; // Upper left corner of meshgradient
28 SVGLength y; // Upper right corner of mesh
31
32 std::unique_ptr<Inkscape::DrawingPaintServer> create_drawing_paintserver() override;
33
34protected:
36 void set(SPAttr key, char const *value) override;
38};
39
40#endif /* !SP_MESH_GRADIENT_H */
41
42/*
43 Local Variables:
44 mode:c++
45 c-file-style:"stroustrup"
46 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
47 indent-tabs-mode:nil
48 fill-column:99
49 End:
50*/
51// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
SPAttr
Definition attributes.h:27
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
Definition cast.h:26
Interface for refcounted XML nodes.
Definition node.h:80
Typed SVG document implementation.
Definition document.h:101
Gradient.
Definition sp-gradient.h:86
Mesh gradient.
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
Write mesh gradient attributes to associated repr.
int tag() const override
void build(SPDocument *document, Inkscape::XML::Node *repr) override
Virtual build: set gradient attributes from its associated repr.
~SPMeshGradient() override
std::unique_ptr< Inkscape::DrawingPaintServer > create_drawing_paintserver() override
Inkscape::XML::Node * repr
Definition sp-object.h:193
SPDocument * document
Definition sp-object.h:188
SVG length type.
Definition svg-length.h:22
static cairo_user_data_key_t key
SPMeshType
A group of classes and functions for manipulating mesh gradients.
Interface for XML documents.
Definition document.h:43