Commit graph

226 commits

Author SHA1 Message Date
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
Mateusz Palkowski
083fa57c3e capi: Added C wrapper for setting spread type
and test

Change-Id: I3b4cd3740a82446fea60ed050814b03f32632f6d
2020-08-06 08:09:40 +00:00
Hermet Park
2555e82f0d fix compile warnings
comparison of unsigned expression < 0 is always false [-Werror=type-limits]

Change-Id: I8cee625056bcde1f2a3cb2b9ce704b33be5bd725
2020-08-06 17:06:36 +09:00
Hermet Park
d92fc13d8b gl_engine: fix compile warnings
this statement may fall through [-Werror=implicit-fallthrough=]

Change-Id: I3cfc9b51697e229a524f6f75e10b83715b06ce13
2020-08-06 16:57:38 +09:00
Hermet Park
ccde125cf5 svg_loader: fix compile warnings.
--warning: extra â^`^x;â^`^y [-Wpedantic]

Change-Id: Ib40079628cac3fff6d991fd05d7d8073dd350361
2020-08-06 16:51:55 +09:00
Hermet Park
7214559ad9 common: fix compile warnings.
--Werror=unused-parameter

Change-Id: If4c04e3e20b67be62b50c3b1e2e909dbd848eccc
2020-08-06 16:48:26 +09:00
Hermet Park
ad48f7d8ba common: fix compile warnings.
--Werror=unused-parameter

Change-Id: I180464d770b1aa04afd39c30a3223a7cd48c78a4
2020-08-06 16:24:24 +09:00
Hermet Park
892f729265 svg_loader: code refactoring.
++neat

Change-Id: I3b5552a2bbf09571ba01f0e31569b553913f400d
2020-08-06 14:35:56 +09:00
Shinwoo Kim
4f0561697a svg_loader: fix build error
This patch is solving following build error.

   error: ‘offsetof’ was not declared in this scope

Depending on build environment, this error could happen.

Change-Id: I3512bb205f79a4d893cf33266db0a9109c0df886
2020-08-06 05:34:59 +00:00
Hermet Park
28ae7a4411 svg_loader: code refactoring
remove macro code that does not helpful.

This just decrease readibility and increase LOC.

Change-Id: I9f1b11318447b45a9f96e7b00c18141fd9e71f9a
2020-08-06 14:34:00 +09:00
Hermet Park
9f6b5eb59e common: changed premultiplied color policy.
Some user have no idea of premultiplied alpha concept,
We suggest more user-friendly interfaces so that they don't confuse it.

Now, this pre-multipying is acommplished by backend engines.

Change-Id: Ifd84d56361cb56a8b98240bbd16690accf370bad
2020-08-06 13:54:51 +09:00
Hermet Park
9979e2cbf7 updated README
prepare for github system.

Change-Id: I0ee45e3ccb56f25f0252aad91a48151d62f9ed02
2020-08-05 20:08:52 +09:00
Hermet Park
cfbd419fbd test arc: revise sample code.
Change-Id: I3629befdf5ce74ae7822929a059b4c95f2a9e88e
2020-08-04 09:57:37 +09:00
Hermet Park
23ca4b4656 Merge "spec: Add spec for rpm packaging" into tizen 2020-08-04 00:42:47 +00:00
Hermet Park
05757ec07c capi: revise some common paint interfaces and added picture stuff.
Change-Id: I9850cbead5ce1ab172f284738fe8456cd19dc3f9
2020-08-04 09:37:08 +09:00
Hermet Park
7106272d97 common: code refactoring.
return as soon as possible.

Change-Id: If48e13e8976bc1692dadd9054b484bf7cd811917
2020-08-03 20:06:02 +09:00
Hermet Park
e98988da02 common shape: support pie filling from arc.
last argument pie=true makes arc to pie shape.

Change-Id: I6f22d00fed77bf728a4ff6e5f1ca42f476ac1664
2020-08-03 20:02:31 +09:00
Hermet Park
0be10ce140 Merge "common shape: added arc implementation" into tizen 2020-08-03 09:50:52 +00:00
Michal Szczecinski
214072babe common shape: added arc implementation
Change-Id: Ib483e24d8e358b2860ca8d46e8b88d58d12bdb62
2020-08-03 08:31:54 +02:00
JunsuChoi
180aab13fb spec: Add spec for rpm packaging
Change-Id: I33a7d7e03549860c122eb56534f492a48784533e
2020-08-03 14:56:31 +09:00
Mateusz Palkowski
7b9c7de1e5 capi: Added C wrappers for gradient func
Change-Id: If41dab9b06f6cec2831ea1361f30b50a193e99c4
2020-07-31 11:34:49 +02:00
Hermet Park
f15aefa5dc test: updated svg sample
also revise size() method of Picture for proper aligning.

Change-Id: I58a0886968f6058e65a062477e2a873224d8ea8f
2020-07-30 21:10:02 +09:00
Hermet Park
e9a4e2ccb6 common: code refactoring
remove duplicated code among the Paint types.

Change-Id: Ia7c09f29531e6aef73d2ba1f951f8dfdf488deb8
2020-07-30 19:52:48 +09:00
Hermet Park
ec6e5618e2 common picture: introduce picture feature which is for vector file extensions.
Now Scene is only specialized for composition of Paint objects.

Change-Id: I16426913f029c89e9f9ac4d5e0afed11d1a228d0
2020-07-30 17:13:00 +09:00
Hermet Park
39b77361c5 common: code refactoring.
changed just internal variable & method names.

no logical changes.

Change-Id: I01782ec59dec3ff2232e03de7b3863100d9cc27f
2020-07-30 15:15:31 +09:00
Hermet Park
8dca270a30 common: code refactoring for simplicity.
Introduce internal PaintMethod since there more derived paint classes are coming.

This PaintMethod is a sort of Strategy Pattern method.

Change-Id: I29c49f5d4ddbfb9e429d4976636b20b39914ee20
2020-07-30 14:51:31 +09:00
Hermet Park
07e5c233a7 Merge "capi: Added wrapper for tvg::Shape::transform (fixed)" into tizen 2020-07-30 04:47:31 +00:00
Hermet Park
80d47fd7d3 common: revise canvas interfaces.
1. removed async option which doesn't work currently,
rather than it, we can add async option in initiailizer class.

2. removed update() method.
Instead, we can call update(paint = nullptr); which has exactly same behavior.

Change-Id: I7909a50d804b97baf413a2ff6365a3cf79a3689e
2020-07-30 13:43:18 +09:00
Hermet Park
8ed9edd33e common: code refactoring
keep consistency of internal functions among the paint type methods.

Change-Id: I98a42ac398ddc5aaf49ac59e5cbb1790266bd612
2020-07-29 20:49:59 +09:00
Hermet Park
afc7bc8c2f common: code refactoring
remove exceptional handling which is inevitable scenario.

Change-Id: I761a59a38f4578291ee8bc044c5ca989feedbe79
2020-07-29 19:53:45 +09:00
Mateusz Palkowski
cd699738b6 capi: Added wrapper
for tvg::Shape::transform (fixed)

Change-Id: Ibbb867e828a07af90f38ed506894d026004fa53d
2020-07-29 12:23:18 +02:00
Hermet Park
9e0c4666af common: revise transform interfaces.
transform interfaces are getting duplicated in derived classes.

we moved to the super for smaller apis count.

Applied strategy pattern to hide the inheritance.

Change-Id: I7b0c3ff9317e9bf3c97bb0c849bf55e79ee9a591
2020-07-29 16:52:40 +09:00
Hermet Park
8a924cbd78 sw_engine: fix out of cell memory.
we can adjust cell size if the cell memory is out.
the main rle logic missed the exception handling.

Change-Id: I4419eefefccafd788729111eafeb65aa4e6a20e9
2020-07-29 13:40:11 +09:00
Hermet Park
d2d4a2a3e7 gl_engine: updated file permission.
please keep 664 for files.

Change-Id: Iaddd87b0d35a74bc8c6cbf330fecbd28e14ad57a
2020-07-28 20:57:34 +09:00
Hermet Park
621d607126 updated AUTHORS
Change-Id: Ia3b91f2dff139b80c5e968be2a0ecb725e6b62bd
2020-07-28 20:46:11 +09:00
Mateusz Palkowski
ba17287419 capi: Added wrapper for tvg::Shape::translate
Change-Id: Idcf672926c489148f15c654f85b4d6c3ff8cde80
2020-07-27 15:12:07 +02:00
Mateusz Palkowski
52ece17fc3 capi: Added wrapper for tvg::Shape::rotate
Change-Id: I2cef6600586c037caaf8d2f45fc6d78e93dce925
2020-07-27 15:11:38 +02:00
Mateusz Palkowski
87a6b5219f capi: Added wrapper for tvg::Shape::scale
Change-Id: Ie8380478d9e5bf99c924f3b93cfbb3d80ff55611
2020-07-27 15:11:08 +02:00
Hermet Park
bee94d48fe sw_engine gradient: support x/y scale for linear gradient
Change-Id: Ic58e7cc61a3c90307b6cfb629eb8af69b75fb903
2020-07-24 21:09:24 +09:00
Hermet Park
76a7c900be sw_engine gradient: support x/y scale for radial gradient
Change-Id: Id725637e261642d0e92d100c73841278b7f44c1c
2020-07-24 16:48:41 +09:00
Hermet Park
5fdc1f7fc8 sw_engine: revise stroke scaling logic.
previous fast track logic is useless,
it actually doesn't helpful for performance, just increase the code complexity.

Change-Id: Ib6ad204edfb241d74c41413dfec7ab42fb02af81
2020-07-24 11:03:20 +09:00
Hermet Park
f1aab52958 sw_engine: support bidirectional stroke scaling.
if the transform scale factor for x/y is not identical,
it keeps its both xy scale factor then apply them
for stroking calculation.

Change-Id: I519dfce3ce7b4a12c13da1801d6a00e139e7400f
2020-07-23 17:36:54 +09:00
JunsuChoi
62aa24d9ad SvgLoader: Fix opacity propagation
Remove duplicate opacity calculation of the scene.

Change-Id: I1253ea290e78fdbf946a492ebfcaaa082fbfc121
2020-07-23 01:40:36 +00:00
Hermet Park
4d72eeda15 sw_engine: revise scale transform logic.
Basically, stroke width size is linear,

engine couldn't apply scale factor from the matrix which contains 2 dimensional values.

Thus, we can apply it if the scale factor of x/y is identical.

Otherwise, we should transform every stroke points in the stroking process.
That scenario can be improved with another patch.

Change-Id: I070dcf29d2e42f21e182bdf4239781464158ef73
2020-07-22 20:59:52 +09:00
Hermet Park
5dcafb8b89 comon: code refactoring
renamed internal variable for better readibility.

Change-Id: I07dc66c4bd63f2aec8036aab14ec3ed608820fbc
2020-07-22 18:45:11 +09:00
Hermet Park
96477c0a24 sw_engine: revise outline transform
sw_engine simulates floating point by integer bit shifting,
it loses the accuracy while converting the number data.

This occurs the inacculated curve points result if it scales up very large size.

So we transform points before converting data in order to avoid losing the numbers less decimal point.

Change-Id: I0172e83f06b1a19143a2f65f667dc193e9a4396a
2020-07-21 18:44:27 +09:00
JunsuChoi
27ca82c140 SvgLoader: Support display=none feature
If display is none, scene does not create a child shape,
and shape does not draw fills and strokes.

Change-Id: I8af72c904be00107dff115429e27df7ba4cb83b6
2020-07-21 02:51:28 +00:00
Hermet Park
6cfb3cdb6c test: replaced svg resources.
Change-Id: I30ab48ecc0bbae158baecce1f6173fc36ecfbbb6
2020-07-20 11:44:53 +09:00
Hermet Park
2ba529c8fb common transformation: fix transformation multiply
Change-Id: Ibc95fab0abfc07aa7f0c4ff6c74785d4f73d02c7
2020-07-17 17:54:21 +09:00
Hermet Park
a5d1542e44 test: ++code safety
added null check for exceptional case.

Change-Id: I12a5e9724149f607188b67a84e46a033a16270f7
2020-07-17 17:15:16 +09:00