projects
/
platform
/
core
/
graphics
/
tizenvg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ab3605
)
tvg_saver: fix the stroke width scaling factor
author
Mira Grudzinska
<m.grudzinska@samsung.com>
Wed, 8 Sep 2021 07:47:57 +0000
(09:47 +0200)
committer
JunsuChoi
<jsuya.choi@samsung.com>
Thu, 9 Sep 2021 00:36:29 +0000
(09:36 +0900)
To get the scaling factor from the transformation matrix we have
to use two of its elements.
src/savers/tvg/tvgTvgSaver.cpp
patch
|
blob
|
history
diff --git
a/src/savers/tvg/tvgTvgSaver.cpp
b/src/savers/tvg/tvgTvgSaver.cpp
index
bba2b9b
..
129d3bc
100644
(file)
--- a/
src/savers/tvg/tvgTvgSaver.cpp
+++ b/
src/savers/tvg/tvgTvgSaver.cpp
@@
-451,7
+451,7
@@
TvgBinCounter TvgSaver::serializeStroke(const Shape* shape, const Matrix* pTrans
//width
auto width = shape->strokeWidth();
- if (preTransform) width *=
pTransform->e11
; //we know x/y scaling factors are same.
+ if (preTransform) width *=
sqrt(pow(pTransform->e11, 2) + pow(pTransform->e21, 2))
; //we know x/y scaling factors are same.
auto cnt = writeTagProperty(TVG_TAG_SHAPE_STROKE_WIDTH, SIZE(width), &width);
//cap