Commit graph

15 commits

Author SHA1 Message Date
Mira Grudzinska
229a013fcd sw_engine math: fixing matrix transformation
Unnecessary rounding during matrix transformation has been removed.
The problem occured when scaling a shape with a dashed stroke.
2021-02-22 11:15:11 +09:00
JunsuChoi
08c37978a9 common: Pointer that can declare const are refactored to use const
Pointer and reference parameters should be "const" if the corresponding object is not modified
2021-02-19 16:51:50 +09:00
Hermet Park
ee1522a446 sw_engine math: fix regression bug.
There is 1 pixel misaligned issue observed.
Found out transform() increases 0.5 pt always.

This transform() logic was broken by this change - e00f948705
and now recorvered to origin.
2020-12-03 18:30:47 +09:00
Hermet Park
04c6295974 code refactoring
remove unnecessary condition.
implementation won't be included multiple times not like headers.

Thus this condition is unnecessary.

Change-Id: Id37e675c40ce7213a06c950da8e5ca17ff7245c9
2020-08-20 16:16:46 +09:00
Hermet Park
9d58643a6c sw_engine: fix loss of data when it's converting.
if SwCoord type is determined to 4byte,
it could lose remarkable value that occur stroking jiggling.

This fixes the issue.

Change-Id: Ib2fed2a3bfc9188a30522f35837439364d446a73
2020-08-20 12:18:51 +09:00
Hermet Park
ffa4a7248b code refactoring
Now, stabilizing is pretty enough.

Remove assert code so that we never abort process in any cases.
This also reduce the binary size.

Change-Id: Ia7d2d5c5a0757b12481eaebad7a86aade6a89c1e
2020-08-19 14:53:38 +09:00
Hermet Park
ac4405a4ec sw_engine: fix potential data overflow.
Change-Id: Ie800fda74d44ad3741f7a92f12681f7f753ee50c
2020-08-13 19:50:46 +09:00
Hermet Park
9893af979f replace license from Apache 2.0 to MIT
Change-Id: I61f7cb2b0e407bc035f3b2ec7da9b7f230057e24
2020-08-13 16:53:38 +09:00
Hermet Park
ef11d500ba common: fix compiler warnings that loss data by mis-matched converision
these conversions are intented, we explicity use casting so that compiler doesn't
catch them anymore.

Change-Id: I9d905c7562c43929b040d034e5ee0d14c6750a80
2020-08-06 20:01:37 +09:00
Hermet Park
cfa17c6df6 svg_engine: fix infinit loop dead in stroke rendering.
here logic was wrongly introducedd, we fix the condition check properly.

Change-Id: I97f18f68290c61096f4e7fe54bd6f6fde51e175b
2020-07-07 11:26:28 +09:00
Hermet Park
5c988d01a5 sw_engine: implement linear gradient feature
also added testLinearGradient

Change-Id: I9cce74b9fc40c4ebd978939ee50955e44e7f44f2
2020-06-13 12:09:39 +09:00
Hermet Park
9aa2566b45 sw_engine: support stroke dash feature
Change-Id: Ibed8bcb6a07952a059bb9a7355f7c43db97aa672
2020-06-06 12:21:30 +09:00
Hermet Park
8614a2efee sw_engine: fix stroke join round result.
a trivial reversed value was returned that
brought the inverted arc drawing...

Change-Id: I928f05b3400772a367d1653496d385354032cbad
2020-06-02 20:25:54 +09:00
Hermet Park
1686af7643 sw_engine: implement stroke rle part
Current stroke fails to merged shapes case...

you can test with testStroke example

Change-Id: I488af728949cba1d01b88723eb1dc4c49bac6c9b
2020-06-02 18:46:43 +09:00
Hermet Park
41dbd9774a sw_engine: implement stroke cubicto, arcto, lineto
Change-Id: I59e95b1031ebfaf54e966cab334e045613ca3830
2020-06-01 19:20:29 +09:00