Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Blackbeard (alberto flores)
Krita
Commits
9e6ee547
Commit
9e6ee547
authored
Aug 10, 2019
by
Blackbeard (alberto flores)
🚢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add appropriate brushType
parent
75365412
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
15 deletions
+27
-15
libs/brush/KisVectorShapeObject.cpp
libs/brush/KisVectorShapeObject.cpp
+13
-10
libs/brush/KisVectorShapeObject.h
libs/brush/KisVectorShapeObject.h
+4
-2
libs/brush/kis_vectoranimated_brush.cpp
libs/brush/kis_vectoranimated_brush.cpp
+7
-2
libs/brush/kis_vectoranimated_brush.h
libs/brush/kis_vectoranimated_brush.h
+1
-0
libs/brush/kis_vectorbrush_parasite.cpp
libs/brush/kis_vectorbrush_parasite.cpp
+2
-1
No files found.
libs/brush/KisVectorShapeObject.cpp
View file @
9e6ee547
...
...
@@ -27,7 +27,7 @@
KisVectorShapeObject
::
KisVectorShapeObject
(
KoShape
*
shape
)
{
m_shape
=
shape
;
renderImage
(
1000
,
100
0
);
renderImage
(
20
,
2
0
);
}
void
KisVectorShapeObject
::
setShape
(
KoShape
*
shape
)
...
...
@@ -57,19 +57,23 @@ void KisVectorShapeObject::renderImage(int width, int height)
theImage
=
theImage
.
convertToFormat
(
QImage
::
Format_Indexed8
,
table
);
setBrushTipImage
(
theImage
);
m_image
=
theImage
;
//
m_image = theImage;
}
QImage
KisVectorShapeObject
::
image
()
enumBrushType
KisVectorShapeObject
::
brushType
()
const
{
return
brushTipImage
()
;
return
IMAGE
;
}
QImage
KisVectorShapeObject
::
brushTipImage
()
const
{
return
m_image
;
}
//QImage KisVectorShapeObject::image()
//{
// return brushTipImage();
//}
//QImage KisVectorShapeObject::brushTipImage() const
//{
// return m_image;
//}
...
...
@@ -86,7 +90,6 @@ KoShape* KisVectorShapeObject::shape()
}
KisBrush
*
KisVectorShapeObject
::
clone
()
const
{
return
new
KisVectorShapeObject
(
*
this
);
...
...
libs/brush/KisVectorShapeObject.h
View file @
9e6ee547
...
...
@@ -64,12 +64,14 @@ public:
/**
* @return a preview of the brush
*/
QImage
brushTipImage
()
const
override
;
//
QImage brushTipImage() const override;
QImage
image
();
//
QImage image();
KoShape
*
shape
();
void
renderImage
(
int
width
,
int
weight
);
enumBrushType
brushType
()
const
override
;
private:
...
...
libs/brush/kis_vectoranimated_brush.cpp
View file @
9e6ee547
...
...
@@ -97,7 +97,7 @@ KisVectorAnimatedBrush::KisVectorAnimatedBrush(const QString& filename)
:
KisScalingSizeBrush
(
filename
)
,
m_d
(
new
Private
())
{
setBrushType
(
PIPE_MA
SK
);
setBrushType
(
PIPE_
I
MA
GE
);
setSpacing
(
1.0
);
setHasColor
(
false
);
...
...
@@ -116,6 +116,11 @@ KisVectorAnimatedBrush::~KisVectorAnimatedBrush()
delete
m_d
;
}
enumBrushType
KisVectorAnimatedBrush
::
brushType
()
const
{
return
PIPE_IMAGE
;
}
KisBrush
*
KisVectorAnimatedBrush
::
clone
()
const
{
return
new
KisVectorAnimatedBrush
(
*
this
);
...
...
@@ -274,7 +279,7 @@ void KisVectorAnimatedBrush::newbrushTip()
setValid
(
true
);
setBrushType
(
MA
SK
);
setBrushType
(
I
MA
GE
);
setHasColor
(
false
);
setWidth
(
brushTipImage
().
width
());
...
...
libs/brush/kis_vectoranimated_brush.h
View file @
9e6ee547
...
...
@@ -65,6 +65,7 @@ public:
// QImage brushTipImage() const override;
enumBrushType
brushType
()
const
override
;
// Asks for the new image
...
...
libs/brush/kis_vectorbrush_parasite.cpp
View file @
9e6ee547
...
...
@@ -82,7 +82,7 @@ QImage KisVectorBrushParasite::shapeToQImage(QList<KoShape *> shapes, int index)
KoShapePainter
painter
;
painter
.
setShapes
(
single_list
);
QImage
theImage
(
1000
,
100
0
,
QImage
::
Format_ARGB32
);
//fix size
QImage
theImage
(
20
,
2
0
,
QImage
::
Format_ARGB32
);
//fix size
{
QPainter
p
(
&
theImage
);
p
.
fillRect
(
0
,
0
,
theImage
.
width
(),
theImage
.
height
(),
Qt
::
white
);
...
...
@@ -94,6 +94,7 @@ QImage KisVectorBrushParasite::shapeToQImage(QList<KoShape *> shapes, int index)
for
(
int
i
=
0
;
i
<
256
;
++
i
)
table
.
push_back
(
qRgb
(
i
,
i
,
i
));
theImage
=
theImage
.
convertToFormat
(
QImage
::
Format_Indexed8
,
table
);
return
theImage
;
}
...
...
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