File indexing completed on 2024-05-05 04:35:18
0001 /* This file is part of the TikZKit project. 0002 * 0003 * Copyright (C) 2013-2014 Dominik Haumann <dhaumann@kde.org> 0004 * 0005 * This library is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU Library General Public License as published 0007 * by the Free Software Foundation, either version 2 of the License, or 0008 * (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 * GNU Library General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Library General Public License 0016 * along with this library; see the file COPYING.LIB. If not, see 0017 * <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 #ifndef TIKZUI_PAINTER_H 0021 #define TIKZUI_PAINTER_H 0022 0023 #include <Qt> 0024 #include <QPen> 0025 0026 namespace tikz { 0027 namespace core{ 0028 class Style; 0029 } 0030 namespace ui { 0031 0032 class PainterPrivate; 0033 0034 class Painter 0035 { 0036 public: 0037 /** 0038 * Default constructor. 0039 */ 0040 Painter(QPainter * p, tikz::core::Style * style); 0041 0042 /** 0043 * Destructor 0044 */ 0045 ~Painter(); 0046 0047 // 0048 // pen helpers 0049 // 0050 public: 0051 /** 0052 * Returns a pen constructed from the style. 0053 */ 0054 QPen pen() const; 0055 0056 /** 0057 * Draw the path with all its style. 0058 */ 0059 void drawPath(const QPainterPath & path); 0060 0061 /** 0062 * Fill the path with all its style. 0063 */ 0064 void fillPath(const QPainterPath & path); 0065 0066 private: 0067 PainterPrivate * const d; 0068 }; 0069 0070 } 0071 } 0072 0073 #endif // TIKZUI_PAINTER_H 0074 0075 // kate: indent-width 4; replace-tabs on;