Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
/*
* SPDX-FileCopyrightText: 2021 Dmitry Kazakov <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "KisInterstrokeData.h"
#include <KoColorSpace.h>
#include <kis_paint_device.h>
KisInterstrokeData::KisInterstrokeData(KisPaintDeviceSP device)
: m_linkedDeviceOffset(device->offset())
, m_linkedColorSpace(device->colorSpace())
, m_linkedPaintDevice(device)
{
}
KisInterstrokeData::~KisInterstrokeData()
{
}
bool KisInterstrokeData::isStillCompatible() const
{
KIS_ASSERT_RECOVER_RETURN_VALUE(m_linkedPaintDevice, false);
return m_linkedDeviceOffset == m_linkedPaintDevice->offset() &&
*m_linkedColorSpace == *m_linkedPaintDevice->colorSpace();
}