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 #include "KisInterstrokeData.h" 0008 0009 #include <KoColorSpace.h> 0010 #include <kis_paint_device.h> 0011 0012 KisInterstrokeData::KisInterstrokeData(KisPaintDeviceSP device) 0013 : m_linkedDeviceOffset(device->offset()) 0014 , m_linkedColorSpace(device->colorSpace()) 0015 , m_linkedPaintDevice(device) 0016 { 0017 0018 } 0019 0020 KisInterstrokeData::~KisInterstrokeData() 0021 { 0022 } 0023 0024 bool KisInterstrokeData::isStillCompatible() const 0025 { 0026 KIS_ASSERT_RECOVER_RETURN_VALUE(m_linkedPaintDevice, false); 0027 0028 return m_linkedDeviceOffset == m_linkedPaintDevice->offset() && 0029 *m_linkedColorSpace == *m_linkedPaintDevice->colorSpace(); 0030 }