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:
9893af9
)
common_shape: fixed arc api to draw rectangles lower than 0.
79/240779/2
author
Michal Szczecinski
<m.szczecinsk@partner.samsung.com>
Tue, 11 Aug 2020 10:11:06 +0000
(12:11 +0200)
committer
Hermet Park
<chuneon.park@samsung.com>
Thu, 13 Aug 2020 08:54:39 +0000
(08:54 +0000)
Absolute value is used to calculate number of bezier curves used
to approximate arc.
Change-Id: Idedd7fd73590d569417fc646fc7febdaaab65857
src/lib/tvgShape.cpp
patch
|
blob
|
history
diff --git
a/src/lib/tvgShape.cpp
b/src/lib/tvgShape.cpp
index
8b17186
..
c688ffc
100644
(file)
--- a/
src/lib/tvgShape.cpp
+++ b/
src/lib/tvgShape.cpp
@@
-167,7
+167,7
@@
Result Shape::appendArc(float cx, float cy, float radius, float startAngle, floa
startAngle = (startAngle * M_PI) / 180;
sweep = sweep * M_PI / 180;
- auto nCurves = ceil(
sweep / M_PI_HALF
);
+ auto nCurves = ceil(
abs(sweep / M_PI_HALF)
);
auto fract = fmod(sweep, M_PI_HALF);
fract = (fract < std::numeric_limits<float>::epsilon()) ? M_PI_HALF : fract;