Rapicorn - Experimental UI Toolkit - Source Code  13.07.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
painter.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __RAPICORN_PAINTER_HH__
00003 #define __RAPICORN_PAINTER_HH__
00004 
00005 #include <ui/primitives.hh>
00006 
00007 namespace Rapicorn {
00008 
00009 class CPainter {
00010 protected:
00011   cairo_t *cr;
00012 public:
00013   explicit      CPainter                (cairo_t *context);
00014   virtual      ~CPainter                ();
00015   void          draw_filled_rect        (int x, int y, int width, int height, Color fill_color);
00016   void          draw_shaded_rect        (int xc0, int yc0, Color color0, int xc1, int yc1, Color color1);
00017   void          draw_center_shade_rect  (int xc0, int yc0, Color color0, int xc1, int yc1, Color color1);
00018   void          draw_border             (int x, int y, int width, int height, Color border, const vector<double> &dashes = vector<double>(), double dash_offset = 0.5);
00019   void          draw_shadow             (int x, int y, int width, int height,
00020                                          Color outer_upper_left, Color inner_upper_left,
00021                                          Color inner_lower_right, Color outer_lower_right);
00022   void          draw_dir_arrow          (double x, double y, double width, double height, Color c, DirType dir);
00023 };
00024 
00025 } // Rapicorn
00026 
00027 #endif  /* __RAPICORN_PAINTER_HH__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines