SvgLoader: Implement ClipPath style
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 24 Sep 2020 02:52:26 +0000 (11:52 +0900)
committerHermet Park <chuneon.park@samsung.com>
Tue, 13 Oct 2020 04:54:32 +0000 (13:54 +0900)
commit64a3623c9d11dc694925737cd053ce5380e93129
tree8077cbd8b84b6f00788dd0fbf246f1e9c9843f62
parentc01826118e6267b580a1ddbd27842d2d5c72c6ae
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
src/loaders/svg/tvgSvgLoader.cpp
src/loaders/svg/tvgSvgLoaderCommon.h
src/loaders/svg/tvgSvgSceneBuilder.cpp