Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Blackbeard (alberto flores)
Krita
Commits
cffe647e
Commit
cffe647e
authored
Jun 19, 2019
by
Blackbeard (alberto flores)
🚢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set brushTipImage from the KoShapePainter
parent
996ad440
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
libs/brush/kis_vectoranimated_brush.cpp
libs/brush/kis_vectoranimated_brush.cpp
+13
-3
No files found.
libs/brush/kis_vectoranimated_brush.cpp
View file @
cffe647e
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment