Inkscape
Vector Graphics Editor
gradient-image.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
14#ifndef SEEN_SP_GRADIENT_IMAGE_H
15#define SEEN_SP_GRADIENT_IMAGE_H
16
17#include <cairomm/refptr.h>
18#include <glibmm/refptr.h>
19#include <gtkmm/drawingarea.h>
20
22
23class SPGradient;
24class SPObject;
25class SPStop;
26
27namespace Gdk {
28class Pixbuf;
29} // namespace Gdk
30
31namespace Inkscape::UI::Widget {
32
33class GradientImage : public Gtk::DrawingArea {
34public:
35 GradientImage(SPGradient *gradient);
36 void set_gradient(SPGradient *gr);
37
38private:
42
43 void draw_func(Cairo::RefPtr<Cairo::Context> const &cr, int width, int height);
44 void gradient_release (SPObject const *obj);
45 void gradient_modified(SPObject const *obj, guint flags);
46};
47
48} // namespace Inkscape::UI::Widget
49
50void sp_gradient_draw (SPGradient *gr, int width, int height,
51 cairo_t *ct);
53Glib::RefPtr<Gdk::Pixbuf> sp_gradient_to_pixbuf_ref(SPGradient *gr, int width, int height);
54Glib::RefPtr<Gdk::Pixbuf> sp_gradstop_to_pixbuf_ref(SPStop *gr, int width, int height);
55
56#endif // SEEN_SP_GRADIENT_IMAGE_H
57
58/*
59 Local Variables:
60 mode:c++
61 c-file-style:"stroustrup"
62 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
63 indent-tabs-mode:nil
64 fill-column:99
65 End:
66*/
67// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8 :
struct _GdkPixbuf GdkPixbuf
Definition: cairo-utils.h:21
void gradient_modified(SPObject const *obj, guint flags)
void draw_func(Cairo::RefPtr< Cairo::Context > const &cr, int width, int height)
void gradient_release(SPObject const *obj)
Gradient.
Definition: sp-gradient.h:86
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition: sp-object.h:146
Gradient stop.
Definition: sp-stop.h:28
GdkPixbuf * sp_gradient_to_pixbuf(SPGradient *gr, int width, int height)
Glib::RefPtr< Gdk::Pixbuf > sp_gradstop_to_pixbuf_ref(SPStop *gr, int width, int height)
void sp_gradient_draw(SPGradient *gr, int width, int height, cairo_t *ct)
Glib::RefPtr< Gdk::Pixbuf > sp_gradient_to_pixbuf_ref(SPGradient *gr, int width, int height)
Custom widgets.
Definition: desktop.h:127
static constexpr int height
struct _cairo cairo_t
Definition: path-cairo.h:16
double height
double width