File indexing completed on 2024-05-12 15:56:41
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2006, 2010 Thomas Zander <zander@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KOINSETS_H 0008 #define KOINSETS_H 0009 0010 #include "kritaflake_export.h" 0011 0012 #include <QDebug> 0013 0014 /** 0015 * An Insets object is a representation of the strokes of a shape. 0016 */ 0017 struct KRITAFLAKE_EXPORT KoInsets 0018 { 0019 public: 0020 /** 0021 * Constructor. 0022 * @param top the inset at the top. 0023 * @param left the inset at the left 0024 * @param bottom the inset at the bottom 0025 * @param right the inset at the right 0026 */ 0027 KoInsets(qreal top, qreal left, qreal bottom, qreal right) 0028 : top(top) 0029 , bottom(bottom) 0030 , left(left) 0031 , right(right) 0032 { 0033 } 0034 /** 0035 * Constructor. 0036 * Initializes all values to 0 0037 */ 0038 KoInsets() : top(0.), bottom(0.), left(0.), right(0.) { 0039 } 0040 0041 /// clears the insets so all sides are set to zero 0042 void clear() { 0043 top = 0; 0044 bottom = 0; 0045 left = 0; 0046 right = 0; 0047 } 0048 0049 qreal top; ///< Top inset 0050 qreal bottom; ///< Bottom inset 0051 qreal left; ///< Left inset 0052 qreal right; ///< Right inset 0053 }; 0054 0055 #ifndef QT_NO_DEBUG_STREAM 0056 KRITAFLAKE_EXPORT QDebug operator<<(QDebug, const KoInsets &); 0057 #endif 0058 0059 #endif