Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-paint-server.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Base class for gradients and patterns
4 *
5 * Author:
6 * Lauris Kaplinski <lauris@kaplinski.com>
7 * Jon A. Cruz <jon@joncruz.org>
8 *
9 * Copyright (C) 1999-2002 Lauris Kaplinski
10 * Copyright (C) 2000-2001 Ximian, Inc.
11 * Copyright (C) 2000-2001 Ximian, Inc.
12 * Copyright (C) 2010 Authors
13 *
14 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
15 */
16
18#include "sp-paint-server.h"
20
22{
23 return static_cast<SPPaintServer *>(URIReference::getObject());
24}
25
27{
28 return is<SPPaintServer>(obj) && URIReference::_acceptObject(obj);
29}
30
32
34
36{
37 return swatch;
38}
39
41{
42 return true;
43}
44
45Inkscape::DrawingPattern *SPPaintServer::show(Inkscape::Drawing &/*drawing*/, unsigned /*key*/, Geom::OptRect const &/*bbox*/)
46{
47 return nullptr;
48}
49
51{
52}
53
54void SPPaintServer::setBBox(unsigned key, Geom::OptRect const &bbox)
55{
56}
57
58std::unique_ptr<Inkscape::DrawingPaintServer> SPPaintServer::create_drawing_paintserver()
59{
60 return {};
61}
62
63/*
64 Local Variables:
65 mode:c++
66 c-file-style:"stroustrup"
67 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
68 indent-tabs-mode:nil
69 fill-column:99
70 End:
71*/
72// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
Axis-aligned rectangle that can be empty.
Definition rect.h:203
Drawing tree node used for rendering paints.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition sp-object.h:160
bool _acceptObject(SPObject *obj) const override
SPPaintServer * getObject() const
virtual bool isValid() const
virtual std::unique_ptr< Inkscape::DrawingPaintServer > create_drawing_paintserver()
virtual Inkscape::DrawingPattern * show(Inkscape::Drawing &drawing, unsigned key, Geom::OptRect const &bbox)
~SPPaintServer() override
virtual void setBBox(unsigned key, Geom::OptRect const &bbox)
bool isSwatch() const
virtual void hide(unsigned key)
Representation of paint servers used when rendering.
static cairo_user_data_key_t key