1 /* 2 * Copyright (c) 2017 Dmitry Kazakov <dimula73@gmail.com> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef KISPAINTINGSTROKEDATA_H 20 #define KISPAINTINGSTROKEDATA_H 21 22 #include "kritaui_export.h" 23 24 class KisPainter; 25 class KisDistanceInformation; 26 27 28 /** 29 * The distance information should be associated with each 30 * painting stroke individually, so we store and manipulate 31 * with them together using KisPaintingStrokeInfo structure 32 */ 33 class KRITAUI_EXPORT KisFreehandStrokeInfo { 34 public: 35 KisFreehandStrokeInfo(); 36 KisFreehandStrokeInfo(const KisDistanceInformation &startDist); 37 KisFreehandStrokeInfo(KisFreehandStrokeInfo *rhs, int levelOfDetail); 38 ~KisFreehandStrokeInfo(); 39 40 KisPainter *painter; 41 KisDistanceInformation *dragDistance; 42 43 /** 44 * The distance inforametion of the associated LodN 45 * stroke. Returns zero if LodN stroke has already finished 46 * execution or does not exist. 47 */ 48 KisDistanceInformation* buddyDragDistance(); 49 50 private: 51 KisFreehandStrokeInfo *m_parentStrokeInfo {0}; 52 KisFreehandStrokeInfo *m_childStrokeInfo {0}; 53 }; 54 55 56 #endif // KISPAINTINGSTROKEDATA_H 57