platform/core/graphics/tizenvg.git
4 years agowasm test: update sample index.html
Shinwoo Kim [Thu, 15 Oct 2020 05:33:40 +0000 (14:33 +0900)]
wasm test: update sample index.html

Update index.html according to updated wasm interface.
Missed chance to update index.html during review.

Change-Id: Ib2ada27619e3bee6d500f0804209dbac076be30f

4 years agoUpdate CONTRIBUTING.md
Hermet Park [Thu, 15 Oct 2020 03:14:50 +0000 (12:14 +0900)]
Update CONTRIBUTING.md

Change-Id: I8cd6512b93c91f9b7f190980b4422efa53e7e6d0

4 years agoUpdate CONTRIBUTING.md submit/tizen/20201018.221456
Hermet Park [Thu, 15 Oct 2020 03:09:08 +0000 (12:09 +0900)]
Update CONTRIBUTING.md

Change-Id: I03e3f6c3d2dc1f0f96a2bbae5432a801402dae1d

4 years agoUpdate CONTRIBUTING.md
Hermet Park [Thu, 15 Oct 2020 03:04:05 +0000 (12:04 +0900)]
Update CONTRIBUTING.md

Change-Id: Id18191e2b7afd2a18d90d45a99a66c40bf06aad3

4 years agoCreate CONTRIBUTING.md
Hermet Park [Thu, 15 Oct 2020 03:01:01 +0000 (12:01 +0900)]
Create CONTRIBUTING.md

First guideline for contribution.

Change-Id: Ie52b32c1fcfe4127b295c1d29f55ea4b63245e74

4 years agothorvg viewer: fix scale problem
Shinwoo Kim [Wed, 14 Oct 2020 08:26:14 +0000 (17:26 +0900)]
thorvg viewer: fix scale problem

If viewer calls load() with a data which does not have size changes of both
viewbox and canvas, then load() does not set a scale value.
This makes incorrect result on viewer side.

So thorvg wasm should set a scale value, whenever load() is called.

Change-Id: I2d29c56d9ae3295f86a2a78944f8cbd4a3cebbb4

4 years agothorvg viewer: add getDefualtData interface
Shinwoo Kim [Wed, 14 Oct 2020 08:43:04 +0000 (17:43 +0900)]
thorvg viewer: add getDefualtData interface

The 'getDefaultData' interface will be used when the svg data area
of thorvg viewer does not have any value.

Change-Id: I5eb8f0bae1d90432b25bf90ebd01403ee908d34f

4 years agosvg_loader: fix wasm data type compile error.
Hermet Park [Wed, 14 Oct 2020 08:51:59 +0000 (17:51 +0900)]
svg_loader: fix wasm data type compile error.

Change-Id: Ie46ef91ccd032cda2a5c27a5811ab505616e0798

4 years agoimprove svg logo design quality.
Hermet Park [Wed, 14 Oct 2020 08:50:32 +0000 (17:50 +0900)]
improve svg logo design quality.

Change-Id: I3d447db750f830db809b28ba7248564a6f6cba2b

4 years agoUpdate README.md
Hermet Park [Tue, 13 Oct 2020 10:15:17 +0000 (19:15 +0900)]
Update README.md

Change-Id: Icd7b27ec9de21f18991f550b129a1072776d42a9

4 years agoUpdate README.md
Hermet Park [Tue, 13 Oct 2020 10:13:46 +0000 (19:13 +0900)]
Update README.md

Change-Id: Id38719d554db7036418596075b843c0644130912

4 years agothorvg viewer: introduce thorvg viewer
Shinwoo Kim [Tue, 15 Sep 2020 06:40:41 +0000 (15:40 +0900)]
thorvg viewer: introduce thorvg viewer

Support Emscripten wasm build for thorvg viewer

Change-Id: I0a70a721acb6446733f714a6d30273949b61be2c

4 years agore-tourched logo design for better quality.
Hermet Park [Tue, 13 Oct 2020 08:22:04 +0000 (17:22 +0900)]
re-tourched logo design for better quality.

Change-Id: I961ee405cf71f9e4a09723035676bfa7184e486b

4 years agosw_engine: fix missing shape update issue.
Hermet Park [Tue, 13 Oct 2020 07:31:39 +0000 (16:31 +0900)]
sw_engine: fix missing shape update issue.

It missed to update shape data if visilibity is changed from false to true by alpha.

Also, it needs to update engine shape data for every requests.

There scenario can be allowed,

1. update shape
2. change shape property
3. update shape
4. draw

previously engine could skip step 3, its result was not properly expected.

@fix #84

Change-Id: Ia37ce4b68ba9cbcea5f590fa365abbee66e9b6cd

4 years agotvgSvgLoader: Add points copy of missing polygon/polyline
JunsuChoi [Tue, 13 Oct 2020 04:45:40 +0000 (13:45 +0900)]
tvgSvgLoader: Add points copy of missing polygon/polyline

When using <use> node, do atrribute copy.
At that time, when target(url) is polygon or polyline,
points array is not copied, causing a problem in output.
So, add missing array copy.

Change-Id: I0c8b295f4723a3e4d96831191073d49058d2923a

4 years agotvgSvgLoader: Fix wrong bracket
JunsuChoi [Tue, 13 Oct 2020 01:00:03 +0000 (10:00 +0900)]
tvgSvgLoader: Fix wrong bracket

Change-Id: I4ae7242816febbddf7b6d1cd05fffe3b8abc0fa6

4 years agotvgSvgLoader: Add "clip-path" attribute
JunsuChoi [Mon, 12 Oct 2020 06:35:28 +0000 (15:35 +0900)]
tvgSvgLoader: Add "clip-path" attribute

Below node types support clip-path.
<circle>
<ellipse>
<g>
<path>
<polygon>
<polyline>
<rect>

Change-Id: I45780fe56d85fe69ec09d1dea7241872c6acb956

4 years agoSvgLoader: Implement ClipPath style
JunsuChoi [Thu, 24 Sep 2020 02:52:26 +0000 (11:52 +0900)]
SvgLoader: Implement ClipPath style

Supports case of using style attribute for defined <clipPath>.
In SVG, <clipPath> can be used as a "clipPath" attribute or a style "clip-path".
This patch only supports "clip-path" of style is declared.
The remaining features will be added later.

[Example SVG case]

<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
 viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">
 <defs>
      <clipPath id="clipPath">
          <rect x="15" y="15" width="40" height="40" fill="#F00" />
          <circle cx="20" cy="20" r="10" fill="#F00" />
      </clipPath>
  </defs>

  <circle cx="25" cy="25" r="20"
          style="fill: #0000ff; clip-path: url(#clipPath); " />
</svg>

Change-Id: Ie9b1000a52070ca86f67ce794413c3640784a079

4 years agoexamples: update DirectUpdate
Hermet Park [Tue, 13 Oct 2020 04:31:29 +0000 (13:31 +0900)]
examples: update DirectUpdate

Shape::clear() method is changed.
Now it clear all properties, the examples must be updated.

Change-Id: Ic5b971240b65738a24a5857a28e42f161ca234cb

4 years agoAdded thorvg logo svg resources,
Hermet Park [Tue, 13 Oct 2020 03:02:31 +0000 (12:02 +0900)]
Added thorvg logo svg resources,
Also replaced svg examples to use them.

Change-Id: I52b5f3af9cf379588d94fcbe0e477aac69e75e99

4 years agosvg_loader: use designated fabsf() for float values.
Hermet Park [Mon, 12 Oct 2020 11:17:42 +0000 (20:17 +0900)]
svg_loader: use designated fabsf() for float values.

fabs() is designed for double type,
but here it uses float type.

Change-Id: Icdc2d6c6541f029e4e8d406da49895d9169fa046

4 years agocommon shape: fix reset() bug. (#99) submit/tizen/20201012.232328
Hermet Park [Thu, 8 Oct 2020 07:37:39 +0000 (16:37 +0900)]
common shape: fix reset() bug. (#99)

Previous reset() doesn't implemented properly.
It resets only path data.

Now Shape resets all drawing properties.

Change-Id: I9385dec0fc1bf34724c85be133f7598a84339050

4 years agoexamples: add stacking example
Hermet Park [Thu, 8 Oct 2020 06:57:01 +0000 (15:57 +0900)]
examples: add stacking example

This example shows how to restack paints node

Change-Id: I7a6fa0ed52976ff0adcdb9910f762c183b1fee86

4 years agoTravis-CI: Add build options
JunsuChoi [Wed, 7 Oct 2020 11:01:39 +0000 (20:01 +0900)]
Travis-CI: Add build options

enable examples and svg2png tool

Change-Id: Ic89459496fc4be1e6d3f49da1909875484bf0cb1

4 years agocommon canvas: revise clear method.
Hermet Park [Thu, 8 Oct 2020 02:55:50 +0000 (11:55 +0900)]
common canvas: revise clear method.

Canvas::clear() introduces a new argument "free" that deterimes freeing the retained paints.

If free is true, Canvas won't delete the retained paints so that user keep paints valid.

In this scenario, user must have paints pointers, free them manually or push them again to the canvas.

This scenario is useful if user wants to re-organize paints order in the list or reuse them.

Change-Id: Ib8c9125dafed301430eee4cd293434b8d84c0ed7

4 years agoAdd PULL_REQUEST_TEMPLATE.md (#92)
JunsuChoi [Wed, 7 Oct 2020 07:27:50 +0000 (16:27 +0900)]
Add PULL_REQUEST_TEMPLATE.md (#92)

[Template]
- Description :

- Issue Tickets (if any) :

- Tests or Samples (if any) :

- Screen Shots (if any) :

Change-Id: I64e671ce55745db25e6b1b5d50585ca446bba05d

4 years agocommon: code refactoring
Hermet Park [Wed, 7 Oct 2020 07:25:09 +0000 (16:25 +0900)]
common: code refactoring

renamed the enum CompMethod -> CompositionMethod

added FIXME comment
also clean up internals for less code.

Change-Id: I5ac3c85fc7cbf8c37578be7b97455e763a898658

4 years agocommon bezier: code refactoring.
Hermet Park [Wed, 7 Oct 2020 05:33:17 +0000 (14:33 +0900)]
common bezier: code refactoring.

use a zero ranged macro.

Change-Id: I1b94518ef2785755663739d26ad693d596a32d21

4 years agoBezier curve: improvement of the curve splitting algorithm
Mira Grudzinska [Thu, 1 Oct 2020 01:09:36 +0000 (03:09 +0200)]
Bezier curve:  improvement of the curve splitting algorithm

bezAt() function needed to be fixed.
Also the convergence in the while loop was sped up and
the break condition was changed.

Change-Id: I7571d2cbe7fd8a3207cc21e5a15892478877b6bf

4 years agoexamples: add missing files.
Hermet Park [Wed, 7 Oct 2020 05:28:11 +0000 (14:28 +0900)]
examples: add missing files.

Change-Id: Id5da21d2c1981df2022c5581ae8f8c5fd19b7473

4 years agoexamples: removed test prefix
Hermet Park [Wed, 7 Oct 2020 04:57:10 +0000 (13:57 +0900)]
examples: removed test prefix

Change-Id: Ie7a897ebaac59701665a5340db31110599a63b8d

4 years agoexamples: revise Stroke, StrokeLine
Hermet Park [Wed, 7 Oct 2020 04:48:09 +0000 (13:48 +0900)]
examples: revise Stroke, StrokeLine

4 years agoSwRender & tvgPaint: Implement ClipPath feature (#68)
JunsuChoi [Wed, 7 Oct 2020 02:21:23 +0000 (11:21 +0900)]
SwRender & tvgPaint: Implement ClipPath feature (#68)

common sw_engine: Implement ClipPath feature

Paint object can composite by using composite API.
ClipPath composite is clipping by path unit of paint.
The following cases are supported.

Shape->composite(Shape);
Scene->composite(Shape);
Picture->composite(Shape);

Add enum
  enum CompMethod { None = 0, ClipPath };

Add APIs
  Result composite(std::unique_ptr<Paint> comp, CompMethod method) const noexcept;

* Example: Added testClipPath

Change-Id: I7151607744ef7f567b6dd2a4bdb4062500197e66

4 years agosw_engine: code refactoring.
Hermet Park [Wed, 7 Oct 2020 01:36:59 +0000 (10:36 +0900)]
sw_engine: code refactoring.

clean code for compaction.

Change-Id: I297a20a10835c880ab798f5e275f3abab2afa26d

4 years agogradient: added check for gradient start and end set for 0
Mateusz Palkowski [Mon, 5 Oct 2020 05:59:30 +0000 (07:59 +0200)]
gradient: added check for gradient start and end set for 0

Change-Id: I5edcf566843f935ce4f84e1a5edd1ff03b300b66

4 years agoupdated .gitignore
Hermet Park [Tue, 6 Oct 2020 05:03:07 +0000 (14:03 +0900)]
updated .gitignore

Change-Id: I3bc0bc2c8f75355706d64ef9413826134d2b9198

4 years agoshape: fixing 'pie' option
Mira Grudzinska [Thu, 1 Oct 2020 01:19:48 +0000 (03:19 +0200)]
shape: fixing 'pie' option

For a dashed arc with pie = 1 the closing line was missing.

Change-Id: Ida5ce74b50195bae2ebadb51c5b10d341ecbc0b9

4 years agoexamples: testStrokeLine example expanded
Mira Grudzinska [Thu, 1 Oct 2020 00:41:50 +0000 (02:41 +0200)]
examples: testStrokeLine example expanded

Added dashed lines to circles and arcs.

Change-Id: Ie37cdf944c20e3c6cc1f941bfd8a9f7693cf4079

4 years agogl_engine: fix compile error. accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.120901 accepted/tizen/6.0/unified/hotfix/20201103.050014 accepted/tizen/unified/20200928.072819 submit/tizen/20200927.213403 submit/tizen_6.0/20201029.205103 submit/tizen_6.0_hotfix/20201102.192503 submit/tizen_6.0_hotfix/20201103.114803 tizen_6.0.m2_release
Hermet Park [Fri, 25 Sep 2020 04:56:47 +0000 (13:56 +0900)]
gl_engine: fix compile error.

After refactoring header includsion, gl_engine has a break at file dependencies.
now this fixes it.

Change-Id: I876e552392bd330b0c5dfe1821d7bfa046b50af8

4 years agogradient: Fixed radial gradient setter.
Michal Szczecinski [Wed, 23 Sep 2020 09:41:32 +0000 (11:41 +0200)]
gradient: Fixed radial gradient setter.

Removed check for gradient radius. Because of check, x and y values
was ignored when radius equals 0 and api was not usable
in integration with external libs which sets gradient center and
radius in separeted functions.

Change-Id: I6af9ca489d158636db7f24f971a625b1d1813cb4

4 years agocommon: code refactoring.
Hermet Park [Thu, 24 Sep 2020 08:05:25 +0000 (17:05 +0900)]
common: code refactoring.

Merge shape internal bodies to one (ShapePath => ShapeImpl),
for keeping less files.

Change-Id: I98ed3c032524f45189e1d30b4a7015410343984a

4 years agooptimization: cut off file dependencies.
Hermet Park [Wed, 23 Sep 2020 11:51:40 +0000 (20:51 +0900)]
optimization: cut off file dependencies.

we should avoid code insertion during file dependencies,
such as #include "xxx.h" which has implementations.

This could increase binary size, we can avoid it as possible.

Current patch improves binary size like this:

From: file(2059008) = text(120360) data(8096) bss(80) dec(128536)
To  : file(1921832) = text(118429) data(7872) bss(56) dec(126357)

More additional patches will come in to optmize binary size.

Change-Id: Iae826752bc80c161c075b5980a485fd27f42e896

4 years agobindings/capi: Added gradient getter
mmaciola [Wed, 23 Sep 2020 06:09:08 +0000 (08:09 +0200)]
bindings/capi: Added gradient getter

Change-Id: Ia109c48cb4d3cf9bc753d52bbf486ad8e7233fa6
Co-authored-by: Michal Maciola <m.maciola@samsung.com>
4 years agoexamples: added stress test.
Hermet Park [Wed, 23 Sep 2020 02:59:44 +0000 (11:59 +0900)]
examples: added stress test.

Change-Id: I2e48dada86608b5494bc56bcc9fbec1f98936642

4 years agoSvgPath: When path end(Z,z), Current point are returned to starting point(M,m)
JunsuChoi [Tue, 22 Sep 2020 05:28:51 +0000 (14:28 +0900)]
SvgPath: When path end(Z,z), Current point are returned to starting point(M,m)

When path ends with 'z' or 'Z' command, if 'm' comes as next command,
the current point is incorrectly referenced.
Since 'Z', 'z' means to close the path,
so, Save point and reuse it when 'M' or 'm' is called.

Change-Id: I6b47ec0d424dbc7dfc3bcf1344cf2ae4c15a1081

4 years agocommon picture: implement duplicate() method.
Hermet Park [Tue, 22 Sep 2020 04:47:23 +0000 (13:47 +0900)]
common picture: implement duplicate() method.

Change-Id: I2fae44b8981560cefd6430e068bf3221535090a5

4 years agocommon scene: implement duplicate() method.
Hermet Park [Tue, 22 Sep 2020 04:20:13 +0000 (13:20 +0900)]
common scene: implement duplicate() method.

Change-Id: I132776aa42a4f170bd3dd0c36a02dbdeaa9613f7

4 years agocommon fill: code refactoring
Hermet Park [Tue, 22 Sep 2020 01:56:53 +0000 (10:56 +0900)]
common fill: code refactoring

removed unique_ptr in the interface because it's hard to get polymorphism benefits in programming perspective.

Change-Id: I1c1fc0a0b5047f365efb17ece3645291a4719224

4 years agoexamples: update testDuplicate.
Hermet Park [Mon, 21 Sep 2020 10:22:47 +0000 (19:22 +0900)]
examples: update testDuplicate.

Added shape gradient fill to check duplication feature.

Change-Id: If2bbfb35d2a6cb4241bfcc8923788cd42512e733

4 years agocommon fill: implement duplicate() method.
Hermet Park [Mon, 21 Sep 2020 10:20:51 +0000 (19:20 +0900)]
common fill: implement duplicate() method.

Change-Id: Ia47a13d4a124d91f84bd5ed755b831ea5c35e3ff

4 years agoUpdate README.md
Hermet Park [Fri, 18 Sep 2020 16:04:34 +0000 (01:04 +0900)]
Update README.md

Add examples section.

Change-Id: I0f6a954caebad0051490f894b3ea89e6fa26760b

4 years agoexamples: move tests to src/examples
Hermet Park [Fri, 18 Sep 2020 15:34:46 +0000 (00:34 +0900)]
examples: move tests to src/examples

tests is now officially placed in src/examples,
default is turned off, only necessaries turn it on.

ex) meson . build -Dexamples=true

+ this examples are required efl 'elementary' package.

Change-Id: I60be4a45d520eab138e25212fbc4de3691bf1127

4 years agobindings/capi: fix c compatibility warnings.
Hermet Park [Fri, 18 Sep 2020 14:36:33 +0000 (23:36 +0900)]
bindings/capi: fix c compatibility warnings.

Change-Id: Idcd5736851950459ea7ad4af96662ea64013be75
warning: empty struct has size 0 in C, size 1 in C++ [-Wextern-c-compat]

4 years agocommon: binary optimization. (#65)
Hermet Park [Fri, 18 Sep 2020 07:34:12 +0000 (16:34 +0900)]
common: binary optimization. (#65)

removed unique_ptr usages from pImpl pattern.
that increased binary size.

2204082 -> 2045672

Change-Id: Idb2c25769704b246d51dce6da5bf85b240787205

4 years agocommon: code refactoring. accepted/tizen/unified/20200923.024103 submit/tizen/20200920.213436
Hermet Park [Fri, 18 Sep 2020 03:14:01 +0000 (12:14 +0900)]
common: code refactoring.

revise duplicate() approach with stategy pattern.

Change-Id: Id829e6ed5bad481ed317f036ee82991a01faa1c1

4 years agoUpdate README.md
Hermet Park [Thu, 17 Sep 2020 11:57:43 +0000 (20:57 +0900)]
Update README.md

fix typos.

Change-Id: Ibd3b4b860e2223f2366cb7867d468c7cb913171c

4 years agobuild: renamed utilities to tools
Hermet Park [Thu, 17 Sep 2020 11:53:25 +0000 (20:53 +0900)]
build: renamed utilities to tools

Change-Id: Ia0675ebbbdfec9aeb8f97ff43804457b68cb30b4

4 years agoUpdate README.md
Hermet Park [Thu, 17 Sep 2020 11:49:47 +0000 (20:49 +0900)]
Update README.md

Change-Id: I7b1f3868b35cee3f1f10cb4606758607a8f57534

4 years agoUpdate README.md
Hermet Park [Thu, 17 Sep 2020 11:49:10 +0000 (20:49 +0900)]
Update README.md

Updated Svg to Png section.

Change-Id: I669fac4f0c2d05e4a55251ffedd8cae8b7ef4f76

4 years agoReadMe: Add description for svg2png (#62)
JunsuChoi [Thu, 17 Sep 2020 11:35:43 +0000 (20:35 +0900)]
ReadMe: Add description for svg2png (#62)

Change-Id: Ieec329b35070308614fa6f774e1b92f2c52e62b1

4 years agoUpdate README.md
Hermet Park [Thu, 17 Sep 2020 03:06:42 +0000 (12:06 +0900)]
Update README.md

retouch the layout and fix some grammars.

Change-Id: I9ee6a7abaa0a1b4e160639b7f3dbea5fc81851c5

4 years agoupdated gitignore
Hermet Park [Thu, 17 Sep 2020 02:30:31 +0000 (11:30 +0900)]
updated gitignore

Change-Id: I44923c66890b746c8fb09156aad093a315d48e52

4 years agocommon shape: fix grammar mistake.
Hermet Park [Thu, 17 Sep 2020 02:29:02 +0000 (11:29 +0900)]
common shape: fix grammar mistake.

array values are not copied by *a = *b;

Change-Id: Ic7b4efa9597778f0a6545a8f80155ba692abe08f

4 years agocommon path: code refactoring.
Hermet Park [Thu, 17 Sep 2020 02:28:05 +0000 (11:28 +0900)]
common path: code refactoring.

revise duplicate() method for clean & neat code.

Change-Id: I040c2a5f05094a284f870806faf2eaf569d8657d

4 years agoshape: added duplicate api.
Michal Szczecinski [Thu, 10 Sep 2020 10:55:08 +0000 (12:55 +0200)]
shape: added duplicate api.

Changes:
1. New shape->duplicate(Shape) api.
2. New example: testDuplicate
3. Added capi binding for duploicate api
4. Added capi duplication test in testCapi.c

Description:

Added implementation of duplicate api. For now it supports stroke
properties and shape properties (fill color, path) duplication.

TODO:
Implement gradient properties duplication

Change-Id: I69e006982aec946fd5a26e5be6d29c6191cd461f

4 years agotest: fix typo
Hermet Park [Wed, 16 Sep 2020 12:01:43 +0000 (21:01 +0900)]
test: fix typo

dash size must be 2, not 4.

Change-Id: Iefaa241bb330ca0a83401518d0415a9480197727

4 years agoUpdate README.md
Hermet Park [Wed, 16 Sep 2020 11:58:00 +0000 (20:58 +0900)]
Update README.md

Change-Id: I4f0e7f7749db9ef9424a17371d37cc3afaaf358a

4 years agoUpdate README.md
Hermet Park [Wed, 16 Sep 2020 11:48:29 +0000 (20:48 +0900)]
Update README.md

Change-Id: Ie4a13d75348c8e63b4822a497d60c16df077c77d

4 years agoUpdate README.md
Hermet Park [Wed, 16 Sep 2020 11:31:49 +0000 (20:31 +0900)]
Update README.md

Change-Id: I1d7067b871f51051611424cb209258349e2be1f9

4 years agoUpdate README.md
Hermet Park [Wed, 16 Sep 2020 11:28:56 +0000 (20:28 +0900)]
Update README.md

Change-Id: I7185f92c51a33f189eac4f8e46fdde9f027d3436

4 years agoREADME: updated example
Hermet Park [Wed, 16 Sep 2020 11:27:50 +0000 (20:27 +0900)]
README: updated example

Change-Id: I9dd2006af98a74766da63bd6f3192c3b5ba7a677

4 years agoUpdate README.md
Hermet Park [Wed, 16 Sep 2020 10:48:12 +0000 (19:48 +0900)]
Update README.md

Change-Id: I1ef76ccfb58dd8e5ca325174104cd89e4d90d321

4 years agoUpdate README.md
Hermet Park [Wed, 16 Sep 2020 10:45:00 +0000 (19:45 +0900)]
Update README.md

Change-Id: Ieb4a1e7135c88b79302d5a9fa9f41f08ca718b6e

4 years agoupdated README
Hermet Park [Wed, 16 Sep 2020 10:42:42 +0000 (19:42 +0900)]
updated README

Change-Id: Ie90c9db06824ce2028e35969b777e5d582018d58

4 years agoUpdate README.md
Hermet Park [Wed, 16 Sep 2020 10:32:43 +0000 (19:32 +0900)]
Update README.md

updated sample code

Change-Id: I9af0929d93da1d768876f4d02852dc8111ee9cc6

4 years agocapi: code refactoring (#58)
Hermet Park [Wed, 16 Sep 2020 10:00:19 +0000 (19:00 +0900)]
capi: code refactoring  (#58)

* capi: refactoring code.

init/term method allows mixing enum values,
we don't need to call them separatetly.

Change-Id: I900137b5578173895ba695c86703ee0035f19e69

4 years agocapi: correct interfaces.
Hermet Park [Wed, 16 Sep 2020 08:53:24 +0000 (17:53 +0900)]
capi: correct interfaces.

put missing const parameter and correct set/get naming.

attention, these two apis are changed!

tvg_gradient_color_stops() => tvg_gradient_set_color_stops()
tvg_gradient_spread() = tvg_gradient_set_spread()

Change-Id: I309b973b8e88bdf33232f95e5da30061b9c2a22b

4 years agobindings/capi: Added path getters + test in testCapi.c
Piotr Kalota [Tue, 15 Sep 2020 12:06:05 +0000 (14:06 +0200)]
bindings/capi: Added path getters + test in testCapi.c

Change-Id: I5ce453509d16c06f5649f08fcd2d16414e7e0f18

4 years agobin svg2png: revise abe7187f5bd3041609ee27b8637b6d55d7353bf0
Hermet Park [Wed, 16 Sep 2020 02:22:54 +0000 (11:22 +0900)]
bin svg2png: revise abe7187f5bd3041609ee27b8637b6d55d7353bf0

revise previous patch code.

1. turned off it in default.
2. + copyright declaration.
3. fix coding convention.

Change-Id: I52577a21240a2abec3ee9a99c0f6614740d65540

4 years agoThorVG/Utils: Convert svg to png (#8)
JunsuChoi [Wed, 16 Sep 2020 02:11:50 +0000 (11:11 +0900)]
ThorVG/Utils: Convert svg to png (#8)

* thorVG/example: added thorVG example app to convert svg to png

Rasterazing the svg file and extracting it as a png file.
The png encoder uses the 'lodepng' library.
(https://lodev.org/lodepng/)

Usage:
   svg2png [svgFileName] [Resolution] [bgColor]

Examples:
    $ svg2png input.svg
    $ svg2png input.svg 200x200
    $ svg2png input.svg 200x200 ff00ff

* ThorVG/Utils: Change examples to utils

* ThorVG/Utils: Move svg2png from util to src/bin

Renamed the build option for svg2png.

Change-Id: Ifa4f3bfc94c1df2f6e207b07ad523a882e754886

4 years agobindings/capi: Added stroke/gradient getters.
Michal Szczecinski [Tue, 15 Sep 2020 06:29:32 +0000 (08:29 +0200)]
bindings/capi: Added stroke/gradient getters.

Change-Id: I2b08b9f8867baa4614274c7848e599690c321215

4 years agocommon: fix compiler warnings.
Hermet Park [Tue, 15 Sep 2020 03:35:52 +0000 (12:35 +0900)]
common: fix compiler warnings.

Change-Id: I4462c9ed073e8ed4ae777e21a57f00481406b931
warning: some methods overrides a member function but is not marked 'override' [-Winconsistent-missing-override]

4 years agosw_engine: fix build warning
Hermet Park [Tue, 15 Sep 2020 03:29:54 +0000 (12:29 +0900)]
sw_engine: fix build warning

Change-Id: I5c5e7bcb4e038b10193a02517b9f7598d48154eb
warning: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Wabsolute-value]

4 years agosw_engine: code refactoring.
Hermet Park [Tue, 15 Sep 2020 03:26:57 +0000 (12:26 +0900)]
sw_engine: code refactoring.

removed unused macro.

Change-Id: I894050103e4c4a939da4f4cb526759a40a9ccd58

4 years agoSvgLoader: Fix wrong display when dasharray size is 1
JunsuChoi [Tue, 15 Sep 2020 02:39:08 +0000 (11:39 +0900)]
SvgLoader: Fix wrong display when dasharray size is 1

If dash array size is 1, it means that dash and gap size are the same.

Change-Id: I40efd6e9152bee013d735a131cbfe5bde65e3783

4 years agoUpdate README.md
JunsuChoi [Mon, 14 Sep 2020 11:54:55 +0000 (20:54 +0900)]
Update README.md

Add build status

Change-Id: Iddc00e94cf865878153a8f445102f437dd51a9f1

4 years agoAdd travis ci build
JunsuChoi [Mon, 14 Sep 2020 11:50:09 +0000 (20:50 +0900)]
Add travis ci build

Change-Id: Iabe0669b1b55f8cdb1c851b7252a6c768e934bdf

4 years agoUpdate README.md
Hermet Park [Fri, 11 Sep 2020 10:49:22 +0000 (19:49 +0900)]
Update README.md

Fix typo

Change-Id: If5af278c08d84b7bb183dda61f3426b16272bfbf

4 years agoSvgLoader: Fixing issues with a A/a command
Mira Grudzinska [Thu, 10 Sep 2020 11:48:06 +0000 (13:48 +0200)]
SvgLoader: Fixing issues with a A/a command

Cmd 'A' from an svg path should not be connected with any other commands via the control points.

Change-Id: I3ef798693660263f16a74d9f068b341f78ecee6e

4 years agosvg_loader: fixing issue with parsing an svg path (A/a cmd)
Mira Grudzinska [Wed, 9 Sep 2020 21:31:30 +0000 (23:31 +0200)]
svg_loader: fixing issue with parsing an svg path (A/a cmd)

The large_arc and sweep flags should be type checked and
whether their value is 1 or 0.

Change-Id: Ia122cd651e8efab06e68cd45cfa252eedbb0e848

4 years agoupdated AUTHORS accepted/tizen/unified/20200914.131341 submit/tizen/20200913.215058
Hermet Park [Fri, 11 Sep 2020 02:15:00 +0000 (11:15 +0900)]
updated AUTHORS

Change-Id: I20ae1591ed854d57eed1063a0ecdc481de86b562

4 years agoSvgLoader: Fix missing doc.gradients update
JunsuChoi [Thu, 10 Sep 2020 11:13:31 +0000 (20:13 +0900)]
SvgLoader: Fix missing doc.gradients update

When both <defs> and <svg> gradients are declared,
the update of gradient declared in <svg> is omitted.
Therefore, this patch fixes any missing gradient updates.

Change-Id: I21f5c31dbc679f8308e19c17bf942b23c4b2bebe

4 years agoSvgLoader: Modify calculation formula of linear gradient matrix
JunsuChoi [Thu, 10 Sep 2020 10:00:16 +0000 (19:00 +0900)]
SvgLoader: Modify calculation formula of linear gradient matrix

When there is a matrix of linear gradient, the applied formula is this.
= T(x - cx, y - cy) x g->transform x T(cx, cy)
This patch has modified this formula to work properly.

Change-Id: I861b796f5c0b375a318e444446eff82a0e922e8a

4 years agosw_engine: code refactoring.
Hermet Park [Thu, 10 Sep 2020 06:28:44 +0000 (15:28 +0900)]
sw_engine: code refactoring.

use macro for single maintenance.

Change-Id: I8a76b5f13abc371cd1f9fa3c9d797becc294f0b2

4 years agosw_engine: the check if the stroke width > 0 after conversion its value from float...
Mira Grudzinska [Tue, 8 Sep 2020 13:30:41 +0000 (15:30 +0200)]
sw_engine: the check if the stroke width > 0 after conversion its value from float to long

During stroke width interpolation, if the width value after conversion
to long was 0, the bbox size was undefined.

Change-Id: I9425b9c16665bdb8346bd00092f73c109cbf9fb9

4 years agoUpdate README.md
Hermet Park [Thu, 10 Sep 2020 01:53:44 +0000 (10:53 +0900)]
Update README.md

Change-Id: I44554322cdca1b716459d197b60e576d0cb81861

4 years agoSvgLoader: Supports case when only rx or ry is declared
JunsuChoi [Wed, 9 Sep 2020 10:36:15 +0000 (19:36 +0900)]
SvgLoader: Supports case when only rx or ry is declared

In relation to the declaration of rx and ry attribute of rect, the following three cases occur.
rx="10" (or ry="10"
rx="10" ry = "0" (or rx="0" ry = "10")
rx="10" ry = "10"
To cover these case, we check the rx and ry declarations.

Change-Id: Ibf1d258a093319ce21b2b907eee58f2a45f17352

4 years agoUpdate README.md
Hermet Park [Wed, 9 Sep 2020 02:11:24 +0000 (11:11 +0900)]
Update README.md

Change-Id: I82d5ff41586a65d4694b766bd5a7979e48e22ae2

4 years agosw_engine: fix shape rendering skip issue.
Hermet Park [Wed, 9 Sep 2020 01:52:45 +0000 (10:52 +0900)]
sw_engine: fix shape rendering skip issue.

tvg canvas must draw retained shapes for every draw call
even though user missed call update() for shapes.

that case canvs must draw shapes without update,
it means drawing them within previous condition.

Change-Id: If15933bd1a04cd3c55dc04a7913f4833094b2b5d

4 years agochanged file permission
Hermet Park [Tue, 8 Sep 2020 11:29:24 +0000 (20:29 +0900)]
changed file permission

Change-Id: Ic39e9e678584f7f46f730799d90c66b063b9817b