Lumiera  0.pre.03
»edityourfreedom«
cairo-util.hpp
Go to the documentation of this file.
1 /*
2  CAIRO-UTIL.hpp - utility functions for Cairo
3 
4  Copyright (C) Lumiera.org
5  2010, Stefan Kangas <skangas@skangas.se>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
29 #include <cairomm/cairomm.h>
30 
31 #ifndef GUI_DRAW_CAIRO_H
32 #define GUI_DRAW_CAIRO_H
33 
34 using Cairo::RefPtr;
35 using Cairo::SolidPattern;
36 
37 
38 namespace gui {
39 namespace draw {
40 
44  class CairoUtil
45  {
46  public:
52  static RefPtr<SolidPattern>
53  pattern_set_red (const RefPtr<SolidPattern> color, double red);
54 
60  static RefPtr<SolidPattern>
61  pattern_set_green (const RefPtr<SolidPattern>, double green);
62 
68  static RefPtr<SolidPattern>
69  pattern_set_blue (const RefPtr<SolidPattern>, double blue);
70 
76  static RefPtr<SolidPattern>
77  pattern_set_alpha (const RefPtr<SolidPattern>, double alpha);
78  };
79 
80 
81 }}// namespace gui::draw
82 #endif /*GUI_DRAW_CAIRO_H*/
static RefPtr< SolidPattern > pattern_set_blue(const RefPtr< SolidPattern >, double blue)
Make a new SolidPattern from an old one, changing the blue component of the colour.
Definition: cairo-util.cpp:61
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:47
static RefPtr< SolidPattern > pattern_set_alpha(const RefPtr< SolidPattern >, double alpha)
Make a new SolidPattern from an old one, changing the alpha component of the colour.
Definition: cairo-util.cpp:74
static RefPtr< SolidPattern > pattern_set_green(const RefPtr< SolidPattern >, double green)
Make a new SolidPattern from an old one, changing the green component of the colour.
Definition: cairo-util.cpp:48
static RefPtr< SolidPattern > pattern_set_red(const RefPtr< SolidPattern > color, double red)
Make a new SolidPattern from an old one, changing the red component of the colour.
Definition: cairo-util.cpp:35