Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-radial-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_RADIAL_GRADIENT_H
11#define SP_RADIAL_GRADIENT_H
12
17#include "sp-gradient.h"
18#include "svg/svg-length.h"
19
20typedef struct _cairo cairo_t;
21typedef struct _cairo_pattern cairo_pattern_t;
22
24class SPRadialGradient final : public SPGradient {
25public:
28 int tag() const override { return tag_of<decltype(*this)>; }
29
35 SVGLength fr; // Focus radius. Added in SVG 2
36
37 std::unique_ptr<Inkscape::DrawingPaintServer> create_drawing_paintserver() override;
38
39protected:
41 void set(SPAttr key, char const *value) override;
42 void update(SPCtx *ctx, unsigned int flags) override;
43 Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override;
44};
45
46#endif /* !SP_RADIAL_GRADIENT_H */
47
48/*
49 Local Variables:
50 mode:c++
51 c-file-style:"stroustrup"
52 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
53 indent-tabs-mode:nil
54 fill-column:99
55 End:
56*/
57// 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
Inkscape::XML::Node * repr
Definition sp-object.h:193
SPDocument * document
Definition sp-object.h:188
Radial gradient.
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
Write radial gradient attributes to associated repr.
int tag() const override
std::unique_ptr< Inkscape::DrawingPaintServer > create_drawing_paintserver() override
void build(SPDocument *document, Inkscape::XML::Node *repr) override
Set radial gradient attributes from associated repr.
~SPRadialGradient() override
void update(SPCtx *ctx, unsigned int flags) override
SVG length type.
Definition svg-length.h:22
_cairo_pattern cairo_pattern_t
static cairo_user_data_key_t key
struct _cairo cairo_t
Definition path-cairo.h:16
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94