Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-solid-color.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SEEN_SP_SOLIDCOLOR_H
3#define SEEN_SP_SOLIDCOLOR_H
4
8/*
9 * Authors: Tavmjong Bah
10 * Copyright (C) 2012 Tavmjong Bah
11 *
12 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
13 */
14
15#include "sp-paint-server.h"
16
17typedef struct _cairo cairo_t;
18typedef struct _cairo_pattern cairo_pattern_t;
19
21class SPSolidColor final
22 : public SPPaintServer
23{
24public:
26 ~SPSolidColor() override;
27 int tag() const override { return tag_of<decltype(*this)>; }
28
29 std::unique_ptr<Inkscape::DrawingPaintServer> create_drawing_paintserver() override;
30
31 void update(SPCtx *ctx, guint flags) override;
32
33protected:
34 void build(SPDocument* doc, Inkscape::XML::Node* repr) override;
35 void set(SPAttr key, char const* value) override;
36 Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags) override;
37};
38
39#endif /* !SEEN_SP_SOLIDCOLOR_H */
40
41/*
42 Local Variables:
43 mode:c++
44 c-file-style:"stroustrup"
45 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
46 indent-tabs-mode:nil
47 fill-column:99
48 End:
49*/
50// 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
Inkscape::XML::Node * repr
Definition sp-object.h:193
Gradient SolidColor.
Inkscape::XML::Node * write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags) override
Virtual set: set attribute to value.
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
std::unique_ptr< Inkscape::DrawingPaintServer > create_drawing_paintserver() override
void update(SPCtx *ctx, guint flags) override
int tag() const override
~SPSolidColor() override
_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