Commit a5edc825 authored by Halla Rempt's avatar Halla Rempt
Browse files

Add a method to dump a paint device to disk

parent 0bb8b525
......@@ -2075,6 +2075,17 @@ KisPaintDeviceFramesInterface* KisPaintDevice::framesInterface()
return m_d->framesInterface.data();
}
void KisPaintDevice::debugPaintDevice(const QString &basename) const
{
static int i = 0;
QString filename = QString ("%1_%2.png").arg(QString::number(i), 6, QChar('0')).arg(basename);
QImage image = convertToQImage(0);
image.save(filename);
i++;
}
/******************************************************************/
/* KisPaintDeviceFramesInterface */
/******************************************************************/
......
......@@ -742,6 +742,12 @@ public:
*/
KisPaintDeviceFramesInterface* framesInterface();
/**
* @brief debugPaintDevice save the current paint device to a numbered PNG image
* @param basename the basename for the file.
*/
void debugPaintDevice(const QString &basename) const;
public:
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment