Commit 374c5eab authored by Blackbeard (alberto flores)'s avatar Blackbeard (alberto flores) 🚢

Set brushTipImage from the KoShapePainter

parent bca0e0cc
......@@ -27,6 +27,7 @@
#include <SvgParser.h>
#include <KoDocumentResourceManager.h>
#include <KoXmlReader.h>
#include <KoShapePainter.h>
#include <QDebug>
......@@ -95,7 +96,14 @@ bool KisVectorAnimatedBrush::loadFromDevice(QIODevice *dev)
qDebug() << "figura" << i;
qDebug() << list.at(i);
}
KoShapePainter painter;
painter.setShapes(list);
QImage theImage(1000, 1000, QImage::Format_ARGB32); //fix size
painter.paint(theImage);
theImage.save("my_testImage", "PNG"); //should save only one image
/* qDebug() << "shapes" << list[0]; */
......@@ -118,14 +126,16 @@ bool KisVectorAnimatedBrush::loadFromDevice(QIODevice *dev)
for (int i = 0; i < 256; ++i) table.push_back(qRgb(i, i, i));
image_ = image_.convertToFormat(QImage::Format_Indexed8, table);
// setBrushTipImage(image_);
setBrushTipImage(image_);
// Blackbeard TODO!!
// KoCanvasControllerWidgetViewport_p.cpp
// KoSvgSymbolCollectionResource.cpp
// KoShapePainter.cpp
// KoShapePainter.cpp --> boud told me to check this library
// SvgWriter.cpp line 256
// KoMarker.cpp line 99
// setBrushTipImage(list.at(0));
// setBrushTipImage(theImage);
// > couldn't you just set a single shape with void setShapes(const
// QList<KoShape*> &shapes); ?
setValid(true);
......
Markdown is supported
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