File indexing completed on 2024-05-12 15:58:51

0001 /*
0002  *  SPDX-FileCopyrightText: 2021 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KISINTERSTROKEDATAFACTORY_H
0008 #define KISINTERSTROKEDATAFACTORY_H
0009 
0010 #include "kritaimage_export.h"
0011 #include "kis_types.h"
0012 
0013 class KisInterstrokeData;
0014 
0015 /**
0016  * A factory class for creation KisInterstrokeData by paint tools
0017  *
0018  * The main purpose for the factory is to check if the currently
0019  * attached interstroke data is compatible with the current tool
0020  * and replace it with the new one if needed.
0021  *
0022  * \see KisInterstrokeData
0023  */
0024 class KRITAIMAGE_EXPORT KisInterstrokeDataFactory
0025 {
0026 public:
0027     virtual ~KisInterstrokeDataFactory();
0028 
0029     virtual bool isCompatible(KisInterstrokeData *data) = 0;
0030     virtual KisInterstrokeData* create(KisPaintDeviceSP device) = 0;
0031 };
0032 
0033 #endif // KISINTERSTROKEDATAFACTORY_H