Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Office
Calligra
Commits
0982b136
Commit
0982b136
authored
Mar 11, 2011
by
Sven Langkamp
Browse files
save angle and scale in predefined brushes
BUG:268209
parent
fa50d22b
Changes
2
Hide whitespace changes
Inline
Side-by-side
krita/plugins/paintops/libbrush/kis_gbr_brush.cpp
View file @
0982b136
...
...
@@ -485,6 +485,8 @@ void KisGbrBrush::toXML(QDomDocument& d, QDomElement& e) const
e
.
setAttribute
(
"type"
,
"gbr_brush"
);
e
.
setAttribute
(
"filename"
,
shortFilename
());
e
.
setAttribute
(
"spacing"
,
QString
::
number
(
spacing
()));
e
.
setAttribute
(
"angle"
,
QString
::
number
(
KisBrush
::
angle
()));
e
.
setAttribute
(
"scale"
,
QString
::
number
(
KisBrush
::
scale
()));
KisBrush
::
toXML
(
d
,
e
);
}
...
...
krita/plugins/paintops/libbrush/kis_gbr_brush_factory.cpp
View file @
0982b136
...
...
@@ -51,6 +51,12 @@ KisBrushSP KisGbrBrushFactory::getOrCreateBrush(const QDomElement& brushDefiniti
}
brush
->
setSpacing
(
spacing
);
double
angle
=
brushDefinition
.
attribute
(
"angle"
,
"0.0"
).
toDouble
();
brush
->
setAngle
(
angle
);
double
scale
=
brushDefinition
.
attribute
(
"scale"
,
"1.0"
).
toDouble
();
brush
->
setScale
(
scale
);
return
brush
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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