platform/core/graphics/tizenvg.git
4 years agotest: enable gl window only on gl backend. 22/237522/1
Hermet Park [Wed, 1 Jul 2020 05:25:53 +0000 (14:25 +0900)]
test: enable gl window only on gl backend.

Change-Id: Iafd790b7fc1df8a58bdce2f18c39029cc0d74945

4 years agosw_engine: fix a regression bug. 02/237502/1
Hermet Park [Wed, 1 Jul 2020 03:53:01 +0000 (12:53 +0900)]
sw_engine: fix a regression bug.

Shape must have closed path for filling color.
if closed is skipped, it would take it's a line.

Change-Id: Ie1dcde9edbfc6501a34d6cb9ce54184ade6864db

4 years agosw_engine: fix to update stroking transform 15/237415/5
Hermet Park [Tue, 30 Jun 2020 07:57:31 +0000 (16:57 +0900)]
sw_engine: fix to update stroking transform

when shape doesn't have fill color, stroking is missed in update.

this fixs that issue.

Change-Id: I49292475e56caa834e79497a16db705b965bcf5f

4 years agotest: revise sample. 91/237391/3
Hermet Park [Tue, 30 Jun 2020 04:08:09 +0000 (13:08 +0900)]
test: revise sample.

this patch adds the showcase how to handle exceptional cases.

Change-Id: Ic8e3c740bbf613f4dccace511b6c8d93b987a10c

4 years agosw_engine: flush all processing data when clear() is requested. 87/237387/1
Hermet Park [Tue, 30 Jun 2020 03:38:01 +0000 (12:38 +0900)]
sw_engine: flush all processing data when clear() is requested.

there was a missing point which occured corrupted data in multi-processing.

Change-Id: Ifb28ee82852e488d23d45b4b75f0a6c70bb428b2

4 years agotest svg: remove white trailings
Hermet Park [Tue, 30 Jun 2020 01:24:56 +0000 (10:24 +0900)]
test svg: remove white trailings

Change-Id: Ie23ffdd420eb9742b21350dfffd5b29ae0515be3

4 years agoMerge "SvgLoader: Supports Path's quadratic_to draw" into tizen
Hermet Park [Tue, 30 Jun 2020 01:22:25 +0000 (01:22 +0000)]
Merge "SvgLoader: Supports Path's quadratic_to draw" into tizen

4 years agotest: unify test code for supporting gl engine from all test cases. 42/237342/7
Hermet Park [Mon, 29 Jun 2020 08:35:04 +0000 (17:35 +0900)]
test: unify test code for supporting gl engine from all test cases.

now you can launch tests with gl engine by "gl" option

ex)
$ testTransform gl
$ testScene gl

Change-Id: Idb720ed369a2fbfb908c977fdaebd7289986fb6f

4 years agotest: Improve svg test 53/237353/2
JunsuChoi [Mon, 29 Jun 2020 10:30:29 +0000 (19:30 +0900)]
test: Improve svg test

Displays svg files located in "./svgs" dir.

Change-Id: I4b9a281dc31fefb28c969780fa28adb74a5f5c02

4 years agoSvgLoader: Fix typo 51/237351/2
JunsuChoi [Mon, 29 Jun 2020 10:24:54 +0000 (19:24 +0900)]
SvgLoader: Fix typo

rect types w, h -> width, height

Change-Id: I5e85360644d9b8c2b2d84f182a0de16fefe9edbf

4 years agoSvgLoader: Supports Path's quadratic_to draw 33/237333/1
JunsuChoi [Mon, 29 Jun 2020 07:35:21 +0000 (16:35 +0900)]
SvgLoader: Supports Path's quadratic_to draw

Convert quadratic bezier to cubic

Change-Id: I885138dcdfb9f0e85bf3ca1ca5c9fc4eb0d8f1f8

4 years agotest: print current backend engine name 31/237331/1
Hermet Park [Mon, 29 Jun 2020 07:26:02 +0000 (16:26 +0900)]
test: print current backend engine name

Change-Id: Iaafa521556a614b47994914c09228b8e8ae9c9e9

4 years agoSvgLoader: Implement svgpath draw 64/237264/4
JunsuChoi [Fri, 26 Jun 2020 09:51:36 +0000 (18:51 +0900)]
SvgLoader: Implement svgpath draw

Convert Svg path in string to tvg::PathCommand.
Draw converted data by adding it as path to shape.

Following tags are supported.
Move, Line, Cubic, SCubic, Vertical, Horizontal and Close.

Change-Id: I3cb31e05bcb233b4c187e0c9e7eef8cdadf84695

4 years agoMerge "SvgLoader: Implement SvgSceneBuilder using SvgNode" into tizen
Hermet Park [Mon, 29 Jun 2020 07:17:15 +0000 (07:17 +0000)]
Merge "SvgLoader: Implement SvgSceneBuilder using SvgNode" into tizen

4 years agoSvgLoader: Implement SvgSceneBuilder using SvgNode 47/237047/13
JunsuChoi [Wed, 24 Jun 2020 10:35:40 +0000 (19:35 +0900)]
SvgLoader: Implement SvgSceneBuilder using SvgNode

SvgSceneBuilder builds Scene using SvgNode tree.
build(root node) function return the root scene.
Following SVG tags are supported.
Polygon, Polyline, Circle, Rect, Line

Change-Id: I8c9b8c28d9a4799af6ddc45c35f77a75f696b2a5

4 years agoupdated AUTHORS
Hermet Park [Mon, 29 Jun 2020 07:16:01 +0000 (16:16 +0900)]
updated AUTHORS

Change-Id: Ife45b8ec1ad39822491e57b6031927a42f6a113b

4 years agoSvgLoader: Implement SVG Loader and SimpleXMLParser 78/236978/26
JunsuChoi [Wed, 24 Jun 2020 00:55:25 +0000 (09:55 +0900)]
SvgLoader: Implement SVG Loader and SimpleXMLParser

Load svg using fstream and parse it using SimpleXMLparser.
And Make a document tree composed of SvgNodes using the parsed data.

Change-Id: I5715b466638195844798f7b66f54f6015e7c3ae6

4 years agotest shape: unify sw/gl test code. 22/237322/1
Hermet Park [Mon, 29 Jun 2020 05:59:01 +0000 (14:59 +0900)]
test shape: unify sw/gl test code.

default is sw engine, please run sample app with "gl" argument

$./testShape gl

Change-Id: Iff7da624ff17827df957919341737b9f129f502e

4 years agorenamed project name tizenvg => thorvg 98/237098/2
Hermet Park [Thu, 25 Jun 2020 04:52:50 +0000 (13:52 +0900)]
renamed project name tizenvg  => thorvg

we're going to open this project as the independent one,

thus removed tizen naming here.

Change-Id: Ib3c898067dd9186e893f7cb0903fd70d2ce7b31f

4 years agosw_engine: fix a regression bug. 56/237056/3
Hermet Park [Wed, 24 Jun 2020 12:00:43 +0000 (21:00 +0900)]
sw_engine: fix a regression bug.

this matrix data is volatile since it's coming from stack memory.
thus engine should record its own memory space for keeping it.

Change-Id: I664dd56412f4d236ad04c312220c67da226274e5

4 years agotest: revise async(stress) test code. 51/237051/2
Hermet Park [Wed, 24 Jun 2020 11:14:46 +0000 (20:14 +0900)]
test: revise async(stress) test code.

Change-Id: I2005f12cc9552b4a98101ba53f48b04c9a6c5732

4 years agosw_engine: optimize rasterizey by threading it. 39/237039/6
Hermet Park [Wed, 24 Jun 2020 08:10:50 +0000 (17:10 +0900)]
sw_engine: optimize rasterizey by threading it.

Also, newly introduced render interfaces: preRender(), postRender(), flush()

Change-Id: If506fa27e3c7dbd89f6734cad4774c1d151b88aa

4 years agosw_engine: threading optimization 46/236946/6
Hermet Park [Tue, 23 Jun 2020 11:12:39 +0000 (20:12 +0900)]
sw_engine: threading optimization

make it prepare step asynchronously.

Change-Id: Ifb85f01d579cf1c111558842496b93fcaef74cd9

4 years agotest: add stress test for performance profiling. 02/237002/2
Hermet Park [Wed, 24 Jun 2020 04:31:09 +0000 (13:31 +0900)]
test: add stress test for performance profiling.

Change-Id: I4a1556c107ba59b7c972375ab8bfd22c777a5503

4 years agosw_engine: optimize memory allocation. 38/236938/1
Hermet Park [Tue, 23 Jun 2020 09:59:12 +0000 (18:59 +0900)]
sw_engine: optimize memory allocation.

there are a logical wrong that memory increase size,
it correct that also tune the number to reduce memory allocation time.

Now scene transform test works smoothly.

Change-Id: If0674e33426d794546801a96ad9de711b5de0dcd

4 years agosw_engine stroke: initialize a missing variable. 18/236918/1
Hermet Park [Tue, 23 Jun 2020 08:38:59 +0000 (17:38 +0900)]
sw_engine stroke: initialize a missing variable.

Change-Id: I1c3d83d56045f592ff89a5462d4de494e50c9d34

4 years agosw_engine: optimize span generation. 17/236917/1
Hermet Park [Tue, 23 Jun 2020 08:29:28 +0000 (17:29 +0900)]
sw_engine: optimize span generation.

there are unnecessary partial spans generated in orthogonal rectangle.

we can merge those partial spans to others if they are on the same scanline...

Change-Id: I35a437a4f2eec106bd50f46f0390c652e617311d

4 years agosw_engine: optimize raster. 80/236880/2
Hermet Park [Tue, 23 Jun 2020 05:41:57 +0000 (14:41 +0900)]
sw_engine: optimize raster.

memset() is more than 10x faster than manual loop.

Thus we replace it to manipulate buffer pixels.

Change-Id: If0f255578f7d49ff6704c4f15e2eefe435cc3c15

4 years agosw_engie: fix wrong boundary check. 76/236876/2
Hermet Park [Tue, 23 Jun 2020 05:14:47 +0000 (14:14 +0900)]
sw_engie: fix wrong boundary check.

this bounding box max indicates absolute positions,
not width/height size.

because of this, shape couldn't rendered properly,
when it's clipped out.

Change-Id: I0afb0d6e63d1b511b83716c55f55e3fd5370fdb8

4 years agoMerge "common transform: support matrix transform interface." into tizen
Hermet Park [Tue, 23 Jun 2020 02:31:23 +0000 (02:31 +0000)]
Merge "common transform: support matrix transform interface." into tizen

4 years agocommon transform: support matrix transform interface. 35/236835/7
Hermet Park [Mon, 22 Jun 2020 11:53:52 +0000 (20:53 +0900)]
common transform: support matrix transform interface.

this interface is designed for user-defined arbitrary affine-transform paints.

required by svg loader.

Change-Id: I7f08023605d224e36cef3770098d3757aee81848

4 years agocommon bezier: code refactoring. 07/236807/1
Hermet Park [Mon, 22 Jun 2020 08:06:53 +0000 (17:06 +0900)]
common bezier: code refactoring.

Organize bezier functions for internal share.

this bezier can be used in svg loader.

Change-Id: I78acd3273c0528688ca46ff7c29d78607bd729bd

4 years agocomon render: split declaration and body. 05/236805/1
Hermet Park [Mon, 22 Jun 2020 07:44:11 +0000 (16:44 +0900)]
comon render: split declaration and body.

Change-Id: I39eb1dfb929b7811fab82956aedbb15f001390e7

4 years agocommon render: code refactoring. 00/236800/1
Hermet Park [Mon, 22 Jun 2020 07:30:18 +0000 (16:30 +0900)]
common render: code refactoring.

just replace the filename.

Change-Id: I6b18520d33c7db3ac9d6c44b10dd693b204495e5

4 years agocommon loader: build up loader infrastructure. 56/236656/4
Hermet Park [Fri, 19 Jun 2020 05:49:07 +0000 (14:49 +0900)]
common loader: build up loader infrastructure.

Change-Id: I62aaed43015301ec39e414833f37d6c5485d8043

4 years agocorrect unmatched files permission.
Hermet Park [Thu, 18 Jun 2020 09:44:52 +0000 (18:44 +0900)]
correct unmatched files permission.

Please keep file permission 664.

Change-Id: I90bdfa76b4f94a06d3b560df42509f30e59111a4

4 years agotest: revise glShape sample.
Hermet Park [Thu, 18 Jun 2020 09:41:10 +0000 (18:41 +0900)]
test: revise glShape sample.

turn on gl window for testing.

Change-Id: I8a965f820d4a09697bc4145147cb0940672933be

4 years agogl_engine: implement gl infrastructure interfaces & test Gl shape sample 57/235957/4
Pranay Kumar Samanta [Wed, 10 Jun 2020 12:44:42 +0000 (18:14 +0530)]
gl_engine: implement gl infrastructure interfaces & test Gl shape sample

Change-Id: Ie142616bf02f9bd50ac8e88e31ed9f782dd6324b
Signed-off-by: Pranay Kumar Samanta <pranay.ks@samsung.com>
4 years agosw_engine renderer: accept stroke less 1 width size.
Hermet Park [Thu, 18 Jun 2020 01:41:58 +0000 (10:41 +0900)]
sw_engine renderer: accept stroke less 1 width size.

Change-Id: I5fe6a0993ab5c1abc79d89834ea04c25b059c320

4 years agocommon scene: design load()/save() interfaces 99/236299/2
Hermet Park [Tue, 16 Jun 2020 06:28:43 +0000 (15:28 +0900)]
common scene: design load()/save() interfaces

these interfaces will perform for vector resources such as svg/tvg/etc ...

see testSvg examples

Change-Id: Icec0a4682301a13646868bd7c3bfc1771ae7db2c

4 years agocommon initializer: replace engine class with intializer 04/236204/3
Hermet Park [Mon, 15 Jun 2020 12:01:46 +0000 (21:01 +0900)]
common initializer: replace engine class with intializer

This initializer will take over the global environments of tvg engines.

Change-Id: I7b99973dafaea57ddd3134800bd442ef4dc319ae

4 years agocommon engine: manage engine initializing context. 01/236201/2
Hermet Park [Mon, 15 Jun 2020 11:55:55 +0000 (20:55 +0900)]
common engine: manage engine initializing context.

Change-Id: Ida3997fd7cc9ee0916d48290168cdb884e946833

4 years agosw_engine: support gradient transformation properly 89/236189/3
Hermet Park [Mon, 15 Jun 2020 10:54:52 +0000 (19:54 +0900)]
sw_engine: support gradient transformation properly

added testGradientTransform

Change-Id: I29037d08ce951e5ceb2eef31cb414efc25296417

4 years agotest: updated trivial comments.
Hermet Park [Mon, 15 Jun 2020 09:10:24 +0000 (18:10 +0900)]
test: updated trivial comments.

Change-Id: If44643d51d9acd3e3042118e39ca3e8f07c148da

4 years agosw_engine: implement gradial gradient feature 91/236091/4
Hermet Park [Sun, 14 Jun 2020 08:53:29 +0000 (17:53 +0900)]
sw_engine: implement gradial gradient feature

also added testRadialGradient

Change-Id: If4a278cb4667c38c7842ad30edf5aa2fdd56fff7

4 years agosw_engine: implement linear gradient feature 52/235952/8
Hermet Park [Thu, 11 Jun 2020 06:06:17 +0000 (15:06 +0900)]
sw_engine: implement linear gradient feature

also added testLinearGradient

Change-Id: I9cce74b9fc40c4ebd978939ee50955e44e7f44f2

4 years agocommon fill: added spread mode. 28/235928/1
Hermet Park [Thu, 11 Jun 2020 05:27:20 +0000 (14:27 +0900)]
common fill: added spread mode.

Change-Id: I95d47bc492d5a22326a745a591d243e56a26bae4

4 years agocommon gradient: implement linear/radial gradient interfaces. 53/235753/7
Hermet Park [Tue, 9 Jun 2020 06:40:13 +0000 (15:40 +0900)]
common gradient: implement linear/radial gradient interfaces.

Change-Id: Ica9c54e662e73592d3fddcabed09b1605b3a5a4f

4 years agocommon: code refacatoring. 66/235766/1
Hermet Park [Tue, 9 Jun 2020 11:43:38 +0000 (20:43 +0900)]
common: code refacatoring.

shorter prefix for better neat code.

it's just a preference.

Change-Id: I30998476a92bc971193e9a5b4436687e48e4d19a

4 years agocommon: ++optimization 64/235764/3
Hermet Park [Tue, 9 Jun 2020 11:17:39 +0000 (20:17 +0900)]
common: ++optimization

replace dynamic_cast to static_cast,

This can be a controversial choice between optmization and clean code.

Obviously we know the converting types,
try avoiding a bit heavier casting some cases.

Change-Id: Id763e6d1db449a229a492ab5b1a901a195936152

4 years agocommon interface: replace arguements size_t to uint32_t 26/235726/3
Hermet Park [Tue, 9 Jun 2020 06:22:33 +0000 (15:22 +0900)]
common interface: replace arguements size_t to uint32_t

We prefer to build up a tiny compact engine at memory rather than compatibility,
this engine is not considerd for end-users but designed for middle-level framework
and some low-level users.

Thus, we won't consider 64bits data size,
use explicit 32 bits data until coming next upgrade...

Change-Id: I0704d5f1e0eb909cccc10922bc5972e115fbbcc0

4 years agocommon interface: concrete return type. 04/235704/5
Hermet Park [Tue, 9 Jun 2020 05:18:58 +0000 (14:18 +0900)]
common interface: concrete return type.

Introduce Result type for notifying caller more detailed info.

We should implement the result values for each apis, with practical values.

Change-Id: Ia47abcb56a8efca7094ac3eed0178aeac8aa2910

4 years agosw_engine: grow cell memory buffer up to allow larger shapes 85/235685/1
Hermet Park [Tue, 9 Jun 2020 02:02:51 +0000 (11:02 +0900)]
sw_engine: grow cell memory buffer up to allow larger shapes

Change-Id: I7a8feaa11d3dad81dd1004782e07a8ac4a768d91

4 years agosw_engine: support stroke dash feature 07/235307/10
Hermet Park [Wed, 3 Jun 2020 11:50:13 +0000 (20:50 +0900)]
sw_engine: support stroke dash feature

Change-Id: Ibed8bcb6a07952a059bb9a7355f7c43db97aa672

4 years agocommon: retyped the color value size_t -> uint8_t 10/235410/1
Hermet Park [Thu, 4 Jun 2020 08:49:10 +0000 (17:49 +0900)]
common: retyped the color value size_t -> uint8_t

since it's range is 0 - 255.

Change-Id: I16e0569341c4a94acab9488d076f235bf90ff4db

4 years agosw_engine shape: ++ comment for later optimization 95/235295/1
Hermet Park [Wed, 3 Jun 2020 10:16:44 +0000 (19:16 +0900)]
sw_engine shape: ++ comment for later optimization

Change-Id: Ie6cd622748b88e2bce0c9d9a79cc4528a95c9c5c

4 years agosw_engine stroke: stabilizing line drawing. 90/235290/2
Hermet Park [Wed, 3 Jun 2020 10:08:18 +0000 (19:08 +0900)]
sw_engine stroke: stabilizing line drawing.

Also added StrokeLine test

Change-Id: I91143039823d744bf9287534227927556a2f51e1

4 years agosw_engine: support stroke transformation properly. 94/235194/2
Hermet Park [Tue, 2 Jun 2020 12:00:50 +0000 (21:00 +0900)]
sw_engine: support stroke transformation properly.

also updated transform test cases.

Yet, this engine is not well optimized,
If they are too mch sluggish,
you can use ELM_FPS envrionment lowing down the fps
when you launch test cases...

ex) $ELM_FPS=30 ./testSceneTransform

Change-Id: I1871d5bedee010d5d6a3d877d95e257120796e8b

4 years agotest scene: remove duplicated engine initialization.
Hermet Park [Wed, 3 Jun 2020 02:41:40 +0000 (11:41 +0900)]
test scene: remove duplicated engine initialization.

Change-Id: I5a2f972544e47578552b0c49367749ce2d01c5f2

4 years agotest stroke: remove duplicated engine initialize call.
Hermet Park [Wed, 3 Jun 2020 02:35:03 +0000 (11:35 +0900)]
test stroke: remove duplicated engine initialize call.

Change-Id: Ia592a45581eae4fd5c85e6ba4d9d0eef835b14c1

4 years agosw_engine: fix a missing of variable initializing.
Hermet Park [Wed, 3 Jun 2020 02:27:34 +0000 (11:27 +0900)]
sw_engine: fix a missing of variable initializing.

Change-Id: I6451b07709fbc56441363e8f0ee0f4647404ae10

4 years agosw_engine: fix mistached c style alloc/free 24/235224/1
Hermet Park [Wed, 3 Jun 2020 02:15:40 +0000 (11:15 +0900)]
sw_engine: fix mistached c style alloc/free

these are allocated by c style mem alloc.
Thus, they should be freed with free()

Change-Id: I320fff4d5a5bce2374ace6495a9f96c3e1034cfc

4 years agocommon stroke: retype the stroke width from size_t to float 93/235193/1
Hermet Park [Tue, 2 Jun 2020 11:58:50 +0000 (20:58 +0900)]
common stroke: retype the stroke width from size_t to float

Change-Id: I812d06d2037d66408c41d50f7c1ff7ba605558bd

4 years agosw_engine: fix stroke join round result. 90/235190/1
Hermet Park [Tue, 2 Jun 2020 11:25:54 +0000 (20:25 +0900)]
sw_engine: fix stroke join round result.

a trivial reversed value was returned that
brought the inverted arc drawing...

Change-Id: I928f05b3400772a367d1653496d385354032cbad

4 years agotest: revise stroke example 83/235183/4
Hermet Park [Tue, 2 Jun 2020 11:04:44 +0000 (20:04 +0900)]
test: revise stroke example

Change-Id: I92a40e905544fd8fb41df88810eabce7429b1b7f

4 years agosw_engine: implement stroke rle part 02/235002/9
Hermet Park [Mon, 1 Jun 2020 11:27:43 +0000 (20:27 +0900)]
sw_engine: implement stroke rle part

Current stroke fails to merged shapes case...

you can test with testStroke example

Change-Id: I488af728949cba1d01b88723eb1dc4c49bac6c9b

4 years agosw_engine: implement stroke cubicto, arcto, lineto 07/234807/9
Hermet Park [Fri, 29 May 2020 02:47:55 +0000 (11:47 +0900)]
sw_engine: implement stroke cubicto, arcto, lineto

Change-Id: I59e95b1031ebfaf54e966cab334e045613ca3830

4 years agosw_engine: Fix build error (no match type) 16/234816/2
JunsuChoi [Fri, 29 May 2020 04:33:46 +0000 (13:33 +0900)]
sw_engine: Fix build error (no match type)

../src/lib/sw_engine/tvgSwStroke.cpp:282:72: error: no match for ‘operator<’ (operand types are ‘long int’ and ‘const SwPoint’)
         if (border->ptsCnt > 0 && abs(diff.x) < EPSILON && abs(diff.y) < EPSILON) return;

Change-Id: I426f8980ba718e3dc908dc32a62fb897b5b5fbbf

4 years agotest: recover sample build.
Hermet Park [Thu, 28 May 2020 11:37:25 +0000 (20:37 +0900)]
test: recover sample build.

introduced by mistake.

Change-Id: I8fd88054da1e86cace02931791a646a182ab6721

4 years agosw_engine: implment basic stroke functions. 47/234247/8
Hermet Park [Sat, 23 May 2020 11:06:40 +0000 (20:06 +0900)]
sw_engine: implment basic stroke functions.

Change-Id: Ib9203b4d133ce7ffd80b40d7ad0cac3519b5273d

4 years agoupdated AUTHORS
Hermet Park [Wed, 27 May 2020 02:03:07 +0000 (11:03 +0900)]
updated AUTHORS

Change-Id: Id756d25e475e8f8cb8379577032e5b41e772b88e

4 years agoMerge "gl_engine: gl infrastructure interfaces" into tizen
Hermet Park [Wed, 27 May 2020 02:01:26 +0000 (02:01 +0000)]
Merge "gl_engine: gl infrastructure interfaces" into tizen

4 years agogl_engine: gl infrastructure interfaces 05/233105/7
Prudhvi Raj Vasireddi [Mon, 11 May 2020 21:39:08 +0000 (17:39 -0400)]
gl_engine: gl infrastructure interfaces

Change-Id: Ie1a9d1b6632433413098282c1cfaf4cf8e1cf9b9
Signed-off-by: Prudhvi Raj Vasireddi <prudhvi.raj@samsung.com>
4 years agocommon shape: introduce stroke cap and join styles. 46/234246/1
Hermet Park [Sat, 23 May 2020 04:32:28 +0000 (13:32 +0900)]
common shape: introduce stroke cap and join styles.

+ revise the getter functions for avoiding invalid overloading.

Change-Id: Ie8b0cbe57435253d75871e864c7cd263a14d6df3

4 years agocommon paint: revise bounds interface. 51/234151/2
Hermet Park [Fri, 22 May 2020 07:30:13 +0000 (16:30 +0900)]
common paint: revise bounds interface.

we don't use the reference style for user interfaces.

Change-Id: Id70682bf8c2d8ea9ffab2ea6fb567eaa8639da60

4 years agocommon stroke: implement stroke interfaces. 46/234146/1
Hermet Park [Fri, 22 May 2020 07:18:32 +0000 (16:18 +0900)]
common stroke: implement stroke interfaces.

Change-Id: I28fe5d5df4cde6640b143e67e241c6afc9c6b1fe

4 years agocommon scene: complete scene tranfsormation feature. 18/233618/3
Hermet Park [Sun, 17 May 2020 12:33:56 +0000 (21:33 +0900)]
common scene: complete scene tranfsormation feature.

Each scene could conserve its own transformation,
the origin could be the parent Paint (if they were beloned to)

Thus, you can compose the multi-tranformed scene group which
simultenoulsly working in own spaces.

See testTransform and testSceneTransform, how they work.

Change-Id: I51deb4d66f8fcd024f8dc7a1e1af57c398a9d7fe

4 years agotest: update samples 17/233617/1
Hermet Park [Sun, 17 May 2020 11:52:58 +0000 (20:52 +0900)]
test: update samples

fix some broken test code.

Change-Id: I42b0dd8b4c599ea59e0860a40b828936dca1e54d

4 years agotest: update transform sample 16/233616/2
Hermet Park [Sun, 17 May 2020 11:34:58 +0000 (20:34 +0900)]
test: update transform sample

Change-Id: I7f1416d9e32b241e50b7e2132764cac28d590a93

4 years agocommon: support Scene Transform 14/233614/2
Hermet Park [Sun, 17 May 2020 07:50:19 +0000 (16:50 +0900)]
common: support Scene Transform

this contains testSceneTransform example

Change-Id: I460b05dc8bc4a842e26e950c800c5c35f8d3da7f

4 years agocommon shape: revise RenderTransform for Scene Transformation 12/233612/4
Hermet Park [Sun, 17 May 2020 05:54:55 +0000 (14:54 +0900)]
common shape: revise RenderTransform for Scene Transformation

This RenderTransform takes over all transform information.

Change-Id: I21b6a55de05feca56c40f3ff402d18445417463c

4 years agofix wrong flag operation.
Hermet Park [Wed, 6 May 2020 02:56:17 +0000 (11:56 +0900)]
fix wrong flag operation.

just correct mistakes.

Change-Id: I8de0fe68cd298cacf3bdc951f67657095c5fa5fe

4 years agocommon shape: introduce transformation matrix 64/232464/2
Hermet Park [Tue, 5 May 2020 16:37:50 +0000 (01:37 +0900)]
common shape: introduce transformation matrix

Paint supports translate, rotate, scale functions for transformation

The origin of these transformation is center of the paint,
thus you have to consider the center-aligned vertices if you'd like to use
these transformation functions.

This policy has been considered for scene transformation.

Change-Id: I78b63d7965faec0ec5b9a98a7776993744534b54

4 years agocommon scene: support bounds() method 59/232459/1
Hermet Park [Tue, 5 May 2020 11:38:26 +0000 (20:38 +0900)]
common scene: support bounds() method

this method returns boundary of a scene.

Change-Id: I1a32c8e034f53822008048f1d8ae7062fb72cca3

4 years agocommon scene: implement basic scene behaviors and testScene sample. 44/232444/4
Hermet Park [Tue, 5 May 2020 01:20:50 +0000 (10:20 +0900)]
common scene: implement basic scene behaviors and testScene sample.

Scene is a group(list) of paints.

This class is designed for vector data set which is prepared before canvas.
If a set of vector data is loaded from other resources such as files,
they can construct these data set using Scene.
This then can be pushed into canvas as one completed image.

Scene is supposed to be used in svg loading and storing to tvg specific data format(tvg)

Change-Id: Ie2ffebf74e79c59d99a77880630a54b6baad7eec

4 years agocommon canvas: hide engine() interface 28/232428/2
Hermet Park [Mon, 4 May 2020 12:23:42 +0000 (21:23 +0900)]
common canvas: hide engine() interface

this engine() is not necessary by users,
we can hide this by moving out CanvasImpl class.

Change-Id: Iaf47dbd3c523e96d6af0bd1fd4caa11a7fd3778a

4 years agocommon shape: refactored interfaces. 27/232427/2
Hermet Park [Mon, 4 May 2020 12:10:04 +0000 (21:10 +0900)]
common shape: refactored interfaces.

hide engine() interface of shape that's not friendly one by users.
instead canvas would access shape internal data to update/draw it.

Now Paint cannot update itself but has to request to Canvas for it.

Change-Id: Ibafd0864a65c3c33238789d1a3e06c49c4378349

4 years agotest: updated test samples. 69/232369/1
Hermet Park [Sun, 3 May 2020 06:14:01 +0000 (15:14 +0900)]
test: updated test samples.

1. added testTransform
2. replaced testShape with testMergeShapes

Change-Id: I1f7b25a1d2f62ac682f7a19e75fc3a44db7c52f0

4 years agocommon shape: revise scale/rotate approach. 66/232366/8
Hermet Park [Sat, 2 May 2020 17:02:43 +0000 (02:02 +0900)]
common shape: revise scale/rotate approach.

Come to think of it, this optimized method is not so useful,
it could just bring the user misunderstanding and
not to efficient as I expected in the most cases.

So, changed policy for transformation behaviors.
it keeps the properties as others but leaves it to the backend implementation.

Plus, this change contains the correct RenderUpdateFlag.
You can refer the flag in the backend to figure out which kinds of properites has been updated

Change-Id: Ibe0494712598a8161950b9ae2e22ac45bed1c47b

4 years agocommon shape: support scale/rotate transform 64/232364/4
Hermet Park [Sat, 2 May 2020 13:30:48 +0000 (22:30 +0900)]
common shape: support scale/rotate transform

rotate(), scale() won't be retained.
When you call reset() for the shape, these values will be reset as well.

These are working in fire & forget method,
it actually modify the path data for avoiding compuatation every frames.

Thus user needs to keep the last values to understand the final accumulated values.

Change-Id: I41f260271cdefc977eea01a778d49632440c777f

4 years agocommon: redesigned interfaces 63/232363/3
Hermet Park [Sat, 2 May 2020 09:16:45 +0000 (18:16 +0900)]
common: redesigned interfaces

PaintNode -> Paint
ShapeNode -> Shape
SceneNode -> Scene

We can keep clean and neat shorter names.

Change-Id: Ic8521d456d947985e5fbe1ba2bde06faa1f52469

4 years agocommon shape: renamed the method clear() to reset() 62/232362/2
Hermet Park [Sat, 2 May 2020 09:06:06 +0000 (18:06 +0900)]
common shape: renamed the method clear() to reset()

Also, added one more showcase how to update only necessary properties of a shape
while retaining other properties...

Change-Id: If165bc7f8147cad0437e3ca2f7c007614c256248

4 years agosw_engine: code refactoring. 61/232361/1
Hermet Park [Sat, 2 May 2020 08:44:49 +0000 (17:44 +0900)]
sw_engine: code refactoring.

renamed internal variables for better readibility.

Change-Id: I1ba7938401e8b7249c8bcc396be1ba3c109716cd

4 years agocanvas: migrate render target clear call into draw(); 60/232360/3
Hermet Park [Sat, 2 May 2020 08:28:18 +0000 (17:28 +0900)]
canvas: migrate render target clear call into draw();

Obivously, we need to clear target before drawing.

Thus canvas request to renderers to clear buffer.

the implementation is upto backend engines.

Change-Id: Ib80da7f2260b021bcfed9fa13fb91c20218f9da0

4 years agocanvas: code refactoring 59/232359/2
Hermet Park [Sat, 2 May 2020 02:14:14 +0000 (11:14 +0900)]
canvas: code refactoring

accept an extra argument in the clear() to clear paints node

and clear buffer selectively.

Change-Id: I83721e74358f546f325bb03fd1f36c7565174dd7

4 years agotest: added testUpdate 58/232358/1
Hermet Park [Sat, 2 May 2020 01:55:33 +0000 (10:55 +0900)]
test: added testUpdate

this shows a moving shape:

how to update canvas every frames.

Change-Id: I373e39757f4511d4e676f36d76e468d03b185a0c

4 years agosw_engine: support anti-aliasing 40/232340/5
Hermet Park [Fri, 1 May 2020 08:15:31 +0000 (17:15 +0900)]
sw_engine: support anti-aliasing

Change-Id: I9b79c8b4022ddf2ae4fe980f480ba3ec140750d3

4 years agosw_engine: support color blending 26/232326/4
Hermet Park [Fri, 1 May 2020 04:59:02 +0000 (13:59 +0900)]
sw_engine: support color blending

this contains testBlending as well

Change-Id: Ia0aadea804a973cfe8ec981ed1b21c1b44512ef2

4 years agotest: rename testPath to testPathCopy 24/232324/1
Hermet Park [Fri, 1 May 2020 03:46:54 +0000 (12:46 +0900)]
test: rename testPath to testPathCopy

Change-Id: I8cf2a26437a804d2cd061d61d3a99b3c6f3aa0e6

4 years agotest: updated comments
Hermet Park [Thu, 30 Apr 2020 14:40:35 +0000 (23:40 +0900)]
test: updated comments

Change-Id: I92fccb5a9de088f837a768a2f1d60ac94eac9410