|
Rapicorn - Experimental UI Toolkit - Source Code 10.08.1
|
00001 /* Rapicorn 00002 * Copyright (C) 2005 Tim Janik 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * A copy of the GNU Lesser General Public License should ship along 00015 * with this library; if not, see http://www.gnu.org/copyleft/. 00016 */ 00017 #ifndef __RAPICORN_PAINTER_HH__ 00018 #define __RAPICORN_PAINTER_HH__ 00019 00020 #include <ui/primitives.hh> 00021 00022 namespace Rapicorn { 00023 00024 class CPainter { 00025 protected: 00026 cairo_t *cr; 00027 public: 00028 explicit CPainter (cairo_t *context); 00029 virtual ~CPainter (); 00030 void draw_filled_rect (int x, int y, int width, int height, Color fill_color); 00031 void draw_shaded_rect (int xc0, int yc0, Color color0, int xc1, int yc1, Color color1); 00032 void draw_center_shade_rect (int xc0, int yc0, Color color0, int xc1, int yc1, Color color1); 00033 void draw_border (int x, int y, int width, int height, Color border, const vector<double> &dashes = vector<double>(), double dash_offset = 0.5); 00034 void draw_shadow (int x, int y, int width, int height, 00035 Color outer_upper_left, Color inner_upper_left, 00036 Color inner_lower_right, Color outer_lower_right); 00037 void draw_dir_arrow (double x, double y, double width, double height, Color c, DirType dir); 00038 }; 00039 00040 } // Rapicorn 00041 00042 #endif /* __RAPICORN_PAINTER_HH__ */
1.7.4