File indexing completed on 2024-12-22 04:12:56

0001 /*
0002  *  SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KISPAINTINGSTROKEDATA_H
0008 #define KISPAINTINGSTROKEDATA_H
0009 
0010 #include "kritaui_export.h"
0011 
0012 class KisPainter;
0013 class KisDistanceInformation;
0014 
0015 
0016 /**
0017  * The distance information should be associated with each
0018  * painting stroke individually, so we store and manipulate
0019  * with them together using KisPaintingStrokeInfo structure
0020  */
0021 class KRITAUI_EXPORT KisFreehandStrokeInfo {
0022 public:
0023     KisFreehandStrokeInfo();
0024     KisFreehandStrokeInfo(const KisDistanceInformation &startDist);
0025     KisFreehandStrokeInfo(KisFreehandStrokeInfo *rhs, int levelOfDetail);
0026     ~KisFreehandStrokeInfo();
0027 
0028     KisPainter *painter;
0029     KisDistanceInformation *dragDistance;
0030 
0031     /**
0032      * The distance information of the associated LodN
0033      * stroke. Returns zero if LodN stroke has already finished
0034      * execution or does not exist.
0035      */
0036     KisDistanceInformation* buddyDragDistance();
0037 
0038 private:
0039     KisFreehandStrokeInfo *m_parentStrokeInfo {0};
0040     KisFreehandStrokeInfo *m_childStrokeInfo {0};
0041 };
0042 
0043 
0044 #endif // KISPAINTINGSTROKEDATA_H