Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-linear-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_LINEAR_GRADIENT_H
11#define SP_LINEAR_GRADIENT_H
12
17#include "sp-gradient.h"
18#include "svg/svg-length.h"
19#include <2geom/line.h>
20
23 : public SPGradient
24{
25public:
28 int tag() const override { return tag_of<decltype(*this)>; }
29
34
35 std::unique_ptr<Inkscape::DrawingPaintServer> create_drawing_paintserver() override;
36
40
41protected:
43 void set(SPAttr key, char const *value) override;
44 void update(SPCtx *ctx, guint flags) override;
45 Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override;
46};
47
48#endif /* !SP_LINEAR_GRADIENT_H */
49
50/*
51 Local Variables:
52 mode:c++
53 c-file-style:"stroustrup"
54 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
55 indent-tabs-mode:nil
56 fill-column:99
57 End:
58*/
59// 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
Infinite line on a plane.
Definition line.h:53
Interface for refcounted XML nodes.
Definition node.h:80
Typed SVG document implementation.
Definition document.h:101
Gradient.
Definition sp-gradient.h:86
Linear gradient.
std::unique_ptr< Inkscape::DrawingPaintServer > create_drawing_paintserver() override
int tag() const override
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
Callback: write attributes to associated repr.
void update(SPCtx *ctx, guint flags) override
Geom::Line getLine() const
~SPLinearGradient() override
void build(SPDocument *document, Inkscape::XML::Node *repr) override
Virtual build: set gradient attributes from its associated repr.
Inkscape::XML::Node * repr
Definition sp-object.h:193
SPDocument * document
Definition sp-object.h:188
SVG length type.
Definition svg-length.h:22
float computed
Definition svg-length.h:50
Infinite straight line.
static cairo_user_data_key_t key
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94