JunsuChoi [Tue, 13 Dec 2022 02:53:50 +0000 (11:53 +0900)]
common Util: Move to before decimal part calculation
Change-Id: I96dc238736eec22f62831850628548ed60d0a08f
JunsuChoi [Mon, 12 Dec 2022 06:08:06 +0000 (15:08 +0900)]
common Util: Skip if there is a space after the dot
Some SVG parsers allow parsing of "0."
If there is a space after the dot, skip to the next step.
Change-Id: Ic1c455e2d5b8bf1e344af903f9721885c9fa1d37
JunsuChoi [Mon, 12 Dec 2022 04:38:43 +0000 (13:38 +0900)]
svg_loader: Change SVG viewbox variable type from int to float
The viewbox and size(width, height) defined in SVG can be of type float.
This prevents matrix calculation errors caused by this.
Change-Id: I85dd502b63dc9a13e969bd459e1f98975c0ef6ed
Hermet Park [Thu, 8 Dec 2022 14:47:57 +0000 (23:47 +0900)]
test picture: add picture mesh api unit test
@Issue: https://github.com/Samsung/thorvg/issues/1241
Change-Id: I52234dd9136428a01526301e94241c26507a997d
Hermet Park [Thu, 8 Dec 2022 14:44:04 +0000 (23:44 +0900)]
common picture: +exception handling.
invalid arguments won't be allowed.
Change-Id: Ia70a3d112e8e8cee36ee1cb05085c95b0402f546
Hermet Park [Wed, 7 Dec 2022 07:20:47 +0000 (16:20 +0900)]
saver/loader tvg: support picture mesh properties.
this mesh properites newly introduced in v0.8
(see:
3dd65dfed00849f0bd9d0bb0ade177fa961cd7a5)
tvg saver/loader should implement mesh support to
properly capture/replay the scene snapshot.
@Issue: https://github.com/Samsung/thorvg/issues/1242
Change-Id: Id48e50be8093c2f13d3f3b4e1112151974597928
Chun [Tue, 14 Mar 2023 08:49:10 +0000 (08:49 +0000)]
Merge "common Accessor: removed deprecated api." into tizen
Chun [Tue, 14 Mar 2023 08:48:59 +0000 (08:48 +0000)]
Merge "Update README.md" into tizen
Chun [Tue, 14 Mar 2023 08:48:48 +0000 (08:48 +0000)]
Merge "common Accessor: Add access API using std::function" into tizen
Chun [Tue, 14 Mar 2023 08:48:21 +0000 (08:48 +0000)]
Merge "common Accessor: Add access api that with data parameter" into tizen
Chun [Tue, 14 Mar 2023 08:48:10 +0000 (08:48 +0000)]
Merge "[svg2png] size limitation while converting the file" into tizen
Chun [Tue, 14 Mar 2023 08:48:00 +0000 (08:48 +0000)]
Merge "SwRaster: Remove comment" into tizen
Chun [Tue, 14 Mar 2023 08:47:47 +0000 (08:47 +0000)]
Merge "SwRaster: Prevent memory issue" into tizen
Hermet Park [Sat, 26 Nov 2022 09:47:55 +0000 (18:47 +0900)]
common Accessor: removed deprecated api.
the old version of Accessor::access() is redundant,
we replaced it with set().
It's still under the beta, we can remove it immediately.
Note that we've planned to promote them official APIs in v0.9.
Newly changed, tagging beta again...w
Change-Id: I1afa8424c81daabe214f5dd704678aa35da610ba
Hermet Park [Sat, 26 Nov 2022 04:41:36 +0000 (13:41 +0900)]
Update README.md
added godot practice.
Change-Id: I5caa77cfb7377123cf3cb26a61690b4b1285cb9c
JunsuChoi [Thu, 24 Nov 2022 04:46:44 +0000 (20:46 -0800)]
common Accessor: Add access API using std::function
Change-Id: I50eb9443137f40d329105fea24739a549dd0ea41
JunsuChoi [Fri, 18 Nov 2022 08:09:35 +0000 (00:09 -0800)]
common Accessor: Add access api that with data parameter
It supports data parameters that
can pass user data to the callback function.
Change-Id: I7b5ea2a2861a741bf7da205c495e8c192c7aeb8c
std::unique_ptr<Picture> access(std::unique_ptr<Picture> picture, bool(*func)(const Paint* paint, void* data), void* data) noexcept;
Mira Grudzinska [Sun, 20 Nov 2022 19:46:50 +0000 (20:46 +0100)]
[svg2png] size limitation while converting the file
In case the svg file size is too large, a heap overflow occurred
when conversting to png. To prevent this a size limitation
has been added - the resolution of the resulting png file cannot
be higher than 8k (7680 x 4320).
Change-Id: Iba8cf11a3afc47a0594b2ff07862fc8ee410002f
JunsuChoi [Tue, 4 Oct 2022 01:08:52 +0000 (10:08 +0900)]
SwRaster: Remove comment
Change-Id: If45195fcba8dda3d2e08a3884428e365ec6f6f9f
JunsuChoi [Thu, 29 Sep 2022 02:11:34 +0000 (11:11 +0900)]
SwRaster: Prevent memory issue
If vv goes out of buffer, it can cause potential memory problems.
Therefore, an `if condition` is added so that it does not exceed the height of the image.
This is temporary fix.
Test)
meson -Db_sanitize=address,undefined -Dexamples=true . build
$ ./build/src/examples/Texmap
==6298==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f37fd6c2180 at pc 0x7f380d884599 bp 0x7fffb02b2db0 sp 0x7fffb02b2da0
READ of size 4 at 0x7f37fd6c2180 thread T0
#0 0x7f380d884598 in _rasterPolygonImageSegment ../src/lib/sw_engine/tvgSwRasterTexmapInternal.h:107
#1 0x7f380d887694 in _rasterPolygonImage ../src/lib/sw_engine/tvgSwRasterTexmap.h:271
#2 0x7f380d88a598 in _rasterTexmapPolygonMesh ../src/lib/sw_engine/tvgSwRasterTexmap.h:639
#3 0x7f380d89828d in _transformedRGBAImageMesh ../src/lib/sw_engine/tvgSwRaster.cpp:701
#4 0x7f380d89828d in rasterImageMesh(SwSurface*, SwImage*, tvg::Polygon const*, unsigned int, tvg::Matrix const*, SwBBox const&, unsigned int) ../src/lib/sw_engine/tvgSwRaster.cpp:1585
#5 0x7f380d89bf16 in tvg::SwRenderer::renderImageMesh(void*) ../src/lib/sw_engine/tvgSwRenderer.cpp:369
#6 0x7f380d830e7e in tvg::Paint::Impl::render(tvg::RenderMethod&) ../src/lib/tvgPaint.cpp:178
#7 0x7f380d823bd2 in tvg::Canvas::Impl::draw() (/home/junsu/dev/os/thorvg/build/src/examples/../libthorvg.so.0+0x265bd2)
#8 0x7f380d821e79 in tvg::Canvas::draw() ../src/lib/tvgCanvas.cpp:60
#9 0x557d07b2d5b6 in drawSwView(void*, _Eo_Opaque*) ../src/examples/Texmap.cpp:103
#10 0x7f380cb7d2aa in evas_process_dirty_pixels ../src/lib/evas/canvas/evas_object_image.c:1894
#11 0x7f380cb7d2aa in _evas_image_pixels_get ../src/lib/evas/canvas/evas_object_image.c:2318
#12 0x7f380cb7d85e in _evas_image_render ../src/lib/evas/canvas/evas_object_image.c:2468
#13 0x7f380cb7ea0c in evas_object_image_render ../src/lib/evas/canvas/evas_object_image.c:2271
#14 0x7f380cbe51db in evas_render_mapped ../src/lib/evas/canvas/evas_render.c:2290
#15 0x7f380cbe6f15 in evas_render_updates_internal_loop ../src/lib/evas/canvas/evas_render.c:3158
#16 0x7f380cbe9912 in evas_render_updates_internal ../src/lib/evas/canvas/evas_render.c:3631
#17 0x7f380cbeb31c in _evas_canvas_render_async ../src/lib/evas/canvas/evas_render.c:4094
#18 0x7f380cb6634a in evas_canvas_render_async ../src/lib/evas/canvas/evas_canvas_eo.c:168
#19 0x7f380cb6fce5 in evas_render_async ../src/lib/evas/canvas/evas_canvas_eo.legacy.c:179
#20 0x7f37f3a81555 in _ecore_evas_x_render ../src/modules/ecore_evas/engines/x/ecore_evas_x.c:761
#21 0x7f3809677e42 in _ecore_evas_idle_enter ../src/lib/ecore_evas/ecore_evas.c:295
#22 0x7f38098a89a4 in _ecore_call_task_cb ../src/lib/ecore/ecore_private.h:456
#23 0x7f38098a89a4 in _ecore_factorized_idle_process ../src/lib/ecore/ecore_idler.c:35
#24 0x7f3809b29081 in _event_callback_call ../src/lib/eo/eo_base_class.c:2114
#25 0x7f3809b29081 in _efl_object_event_callback_call ../src/lib/eo/eo_base_class.c:2186
#26 0x7f3809b22d22 in efl_event_callback_call ../src/lib/eo/eo_base_class.c:2189
#27 0x7f38098aae44 in _ecore_main_loop_iterate_internal ../src/lib/ecore/ecore_main.c:2466
#28 0x7f38098ab689 in _ecore_main_loop_begin ../src/lib/ecore/ecore_main.c:1231
#29 0x7f38098b05e0 in _efl_loop_begin ../src/lib/ecore/efl_loop.c:57
#30 0x7f38098af77c in efl_loop_begin src/lib/ecore/efl_loop.eo.c:28
#31 0x7f38098ab755 in ecore_main_loop_begin ../src/lib/ecore/ecore_main.c:1316
#32 0x7f380d14ba1f in elm_run ../src/lib/elementary/elm_main.c:1359
#33 0x557d07b2d298 in main ../src/examples/Texmap.cpp:176
#34 0x7f380b533c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
#35 0x557d07b2d3c9 in _start (/home/junsu/dev/os/thorvg/build/src/examples/Texmap+0xb3c9)
Change-Id: I732019b5ac8aa01d200c1036e56d5a7143544c30
jykeon [Tue, 14 Mar 2023 08:05:15 +0000 (17:05 +0900)]
Bump up 0.8.5
Change-Id: I8be041ac09cf457cc85d976ac2093b1886b45497
Signed-off-by: jykeon <jykeon@samsung.com>
Hermet Park [Fri, 2 Sep 2022 03:02:39 +0000 (12:02 +0900)]
svg loader: remove unused logic.
Please keep it simple and easy.
Don't leave a chance compiler warn it.
Change-Id: I48e7928131172ff50c223fb450e57fb18d237437
Mira Grudzinska [Fri, 2 Sep 2022 02:59:49 +0000 (04:59 +0200)]
svg_loader: preserveAspectRatio attrib handled according to the svg standard (#1249)
* svg_loader: preserveAspectRatio attrib handled according to the svg standard
* svg_loader: symbol fixed
The correct width/height values used in the _useBuildHelper function.
Bug was propageted while the preserveAspectRatio attrib was handled,
now fixed.
* svg_loader: refactoring code regarding the preserveAspectRatio attrib
To avoid copy/paste a new function is introduced to handle the proper
scaling.
* svg_loader: initialize the svg loader members
The 'align' and 'meetOrSlice' svg loader members were not initialized.
* svg_loader: resize function forces any transformation
The resize function is called after the svg image is read and scaled
taking into account the proper preserveAspectRatio value. While resizing
the preserveAspectRatio isn't checked any more and the image can be
freely transformed.
Change-Id: I5ec14b7676063f60c1fc3b12262cc06f85f64e97
Mira Grudzinska [Wed, 31 Aug 2022 23:15:59 +0000 (01:15 +0200)]
svg_loader: deeper search for postponed nodes
Till now the proper node was searched only among children,
now all the nodes are checked.
Change-Id: I46b9fa1de2de3cc5c53e327f0e6bb6b6dd415fc9
Mira Grudzinska [Thu, 1 Sep 2022 18:53:39 +0000 (20:53 +0200)]
svg_loader: prevent stack-overflow for nested nodes
Change-Id: Ib479c8af995f2b7576503dbd182defd4a1747d9d
JunsuChoi [Wed, 31 Aug 2022 09:07:40 +0000 (18:07 +0900)]
svg_loader: No skip luma mask when composition node is image
Improved to skip Luma Mask when conditions are the same
as AlphaMask for optimization in
e409bb29.
If the composition node is an image, it is not skipped because
it is not known for sure whether to skip it.
Change-Id: I82d1c5ab0ad4bf9624913a574556ea7ae7709a7e
Mira Grudzinska [Tue, 30 Aug 2022 22:21:59 +0000 (00:21 +0200)]
svg_loader: prevent mem leaks
A necessary check added before strdup function is called
Change-Id: Ibc1cbfc29ea342d5ca31390b306943f7d5f6e25d
JunsuChoi [Tue, 30 Aug 2022 01:54:20 +0000 (10:54 +0900)]
svg_loader: Remove unnecessary code
Change-Id: Ia3e0d35ed48b3c04c2408ca24d48bf43c32cc54c
JunsuChoi [Mon, 29 Aug 2022 04:32:06 +0000 (13:32 +0900)]
svg_loader: If there is already set color url, it will be deleted.
When setting the url for color, if there is an already set url,
it will be overwritten after deletion. This prevents memory leaks.
asan result)
Direct leak of 2 byte(s) in 1 object(s) allocated from:
#0 0x7ff1d547bc68 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10bc68)
#1 0x7ff1d4e435b4 in _idFromUrl ../src/loaders/svg/tvgSvgLoader.cpp:327
#2 0x7ff1d4e44a8e in _toColor ../src/loaders/svg/tvgSvgLoader.cpp:558
#3 0x7ff1d4e42ee9 in _parseStyleAttr ../src/loaders/svg/tvgSvgLoader.cpp:1033
#4 0x7ff1d4e7f092 in simpleXmlParseAttributes(char const*, unsigned int, bool (*)(void*, char const*, char const*), void const*) ../src/loaders/svg/tvgXmlParser.cpp:361
#5 0x7ff1d4e597d3 in _createPathNode ../src/loaders/svg/tvgSvgLoader.cpp:1363
#6 0x7ff1d4e61359 in _svgLoaderParserXmlOpen ../src/loaders/svg/tvgSvgLoader.cpp:2723
#7 0x7ff1d4e61c49 in _svgLoaderParser ../src/loaders/svg/tvgSvgLoader.cpp:2801
#8 0x7ff1d4e7f3f6 in simpleXmlParse(char const*, unsigned int, bool, bool (*)(void*, SimpleXMLType, char const*, unsigned int), void const*) ../src/loaders/svg/tvgXmlParser.cpp:429
#9 0x7ff1d4e639a1 in SvgLoader::run(unsigned int) ../src/loaders/svg/tvgSvgLoader.cpp:3121
#10 0x7ff1d4dc8b75 in tvg::Task::operator()(unsigned int) ../src/lib/tvgTaskScheduler.h:68
#11 0x7ff1d4dc8b75 in tvg::TaskSchedulerImpl::run(unsigned int) ../src/lib/tvgTaskScheduler.cpp:138
#12 0x7ff1d4dc98f7 in tvg::TaskSchedulerImpl::TaskSchedulerImpl(unsigned int)::{lambda()#1}::operator()() const ../src/lib/tvgTaskScheduler.cpp:113
#13 0x7ff1d4dc98f7 in void std::__invoke_impl<void, tvg::TaskSchedulerImpl::TaskSchedulerImpl(unsigned int)::{lambda()#1}>(std::__invoke_other, tvg::TaskSchedulerImpl::TaskSchedulerImpl(unsigned int)::{lambda()#1}&&) /usr/include/c++/9/bits/invoke.h:60
#14 0x7ff1d4dc98f7 in std::__invoke_result<tvg::TaskSchedulerImpl::TaskSchedulerImpl(unsigned int)::{lambda()#1}>::type std::__invoke<tvg::TaskSchedulerImpl::TaskSchedulerImpl(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (tvg::TaskSchedulerImpl::TaskSchedulerImpl(unsigned int)::{lambda()#1}&&)...) /usr/include/c++/9/bits/invoke.h:95
#15 0x7ff1d4dc98f7 in void std::thread::_Invoker<std::tuple<tvg::TaskSchedulerImpl::TaskSchedulerImpl(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/9/thread:244
#16 0x7ff1d4dc98f7 in std::thread::_Invoker<std::tuple<tvg::TaskSchedulerImpl::TaskSchedulerImpl(unsigned int)::{lambda()#1}> >::operator()() /usr/include/c++/9/thread:251
#17 0x7ff1d4dc98f7 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<tvg::TaskSchedulerImpl::TaskSchedulerImpl(unsigned int)::{lambda()#1}> > >::_M_run() /usr/include/c++/9/thread:195
#18 0x7ff1d3a344bf (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xd44bf)
example)
<svg height="400" width="600" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
<defs>
<radialGradient r="12" fy="10" fx="10" cy="10" cx="10" id="i" xlink:href="#d"/>
<clipPath id="g" clipPathUnits="userSpaceOnUse">
<path d="M0 10 10z" style="marker:none" fill="#fff" stroke-width="2"/>
</clipPath>
</defs>
<path d="M0 10 Z" fill="url(#g)" style="fill:url(#i);fill-opacity:1"/>
</svg>
Change-Id: I14c605e7555dbda19113b9f9027954654e423f4b
Mira Grudzinska [Sun, 28 Aug 2022 21:45:29 +0000 (23:45 +0200)]
svg_loader: fill and stroke paiint url were copied twice
The url were copied in the _copyAttr and in the _styleCopy
functions.
Change-Id: Ia68f3f4be8c68e4be517d1376e0cf68e1d468bcc
Mira Grudzinska [Sun, 28 Aug 2022 22:06:52 +0000 (00:06 +0200)]
svg_loader: only the first css style node is interpreted
Since the css id selector is not supported in TVG, only the first
style node is taken into account.
Change-Id: I23775d42f03668372ccae770d9cb6164bebf2ee2
Mira Grudzinska [Sat, 29 Jan 2022 22:03:58 +0000 (23:03 +0100)]
svg_loader: a css style node shouldn't have a parent
This node is supposed to be separeted from the main tree nodes.
Change-Id: I3cdfc679ef38ca8eee7750c173b7fcc87d8bdd27
jykeon [Tue, 14 Mar 2023 04:26:38 +0000 (13:26 +0900)]
Bump up 0.8.4
Change-Id: Idb062490ebc372e629145db3d8f59592dd0081a4
Signed-off-by: jykeon <jykeon@samsung.com>
Vincent Torri [Wed, 24 Aug 2022 11:09:56 +0000 (13:09 +0200)]
Fix compilation error on Windows
Change-Id: Id9862cbce599596661bbb7d71d70f8732a32ef60
Hermet Park [Tue, 23 Aug 2022 13:44:24 +0000 (22:44 +0900)]
examples: fix a compilation error on windows.
../src/examples/Performance.cpp:32:8: error: 'uint' does not name a type; did you mean 'u_int'?
32 | static uint cnt = 0;
| ^~~~
| u_int
@Issues: https://github.com/Samsung/thorvg/issues/1247
Change-Id: I3f9ae082a89d32519517bedce68cdd5e0c21564b
Vincent Torri [Sat, 20 Aug 2022 08:55:16 +0000 (10:55 +0200)]
fix compilation of svg2png on Windows
Change-Id: I9d7dda51a99d0112357bb61cb19f9b55ce802ac1
Hermet Park [Sat, 20 Aug 2022 06:21:31 +0000 (15:21 +0900)]
common picture: code refactoring.
keep api parameter naming consistency.
ptsCnt, cmdCnt, triangleCnt ...
Change-Id: Ie2b6c7e7781877700dd446a838c254ef73d02413
Hermet Park [Sat, 20 Aug 2022 05:44:20 +0000 (14:44 +0900)]
common picture: code refactoring.
++ neat & clean
Change-Id: I40a28efd77c5bd1dc680fb9a774196a263397e91
Hermet Park [Sat, 20 Aug 2022 05:27:11 +0000 (14:27 +0900)]
apis: removed BETA_API tag for identifiers and Accessor.
These apis are promoted to the official apis, released in v0.9
Change-Id: I677a125a0bf37e953842164e0e640946f52622b6
Hermet Park [Sat, 20 Aug 2022 04:25:27 +0000 (13:25 +0900)]
Update CONTRIBUTING.md
Change-Id: Ifd9ca62af21cdf6094a00feb1bdc1b1e9dc4f53c
jykeon [Fri, 10 Mar 2023 05:39:24 +0000 (14:39 +0900)]
Bump up 0.8.3
Change-Id: I18e1dfa786e799e8d128046ab60a66569b4e689c
Signed-off-by: jykeon <jykeon@samsung.com>
projectitis [Sat, 20 Aug 2022 00:32:31 +0000 (12:32 +1200)]
Fix compiler warnings on windows
Change-Id: I86897d1fea2d1b69813bf08b173a11685408cd2a
projectitis [Fri, 19 Aug 2022 07:56:43 +0000 (19:56 +1200)]
common picture: support image mesh feature
Tvg Picture newly provides mesh() api to support texture mapping.
These apis allows to have a coarse triangle list which have polygon coordinates
and texture uvs those are used for traditional polygon texture mapping.
Note that these apis are beta version.
@API Additions:
Result mesh(const Polygon* triangles, const uint32_t triangleCount) noexcept
uint32_t mesh(const Polygon** triangles) const noexcept
@Examples:
//Mapping with two polygons
Polygon polygon[2];
//First polygon
polygon[0].vertex[0].pt = {0, 0};
polygon[0].vertex[1].pt = {100, 0};
polygon[0].vertex[2].pt = {0, 100};
polygon[0].vertex[0].uv = {0, 0};
polygon[0].vertex[1].uv = {1, 0};
polygon[0].vertex[2].uv = {0, 1};
//Second polygon
polygon[1].vertex[0].pt = {100, 0};
polygon[1].vertex[1].pt = {100, 100};
polygon[1].vertex[2].pt = {0, 100};
polygon[1].vertex[0].uv = {1, 0};
polygon[1].vertex[1].uv = {1, 1};
polygon[1].vertex[2].uv = {0, 1};
//Apply polygons to the picture
picture->mesh(polygon, 2);
@Issues: https://github.com/Samsung/thorvg/issues/1218
Change-Id: I8400a654b392d1d01e01727e0bc0d829cd155080
Vincent Torri [Fri, 19 Aug 2022 03:49:00 +0000 (05:49 +0200)]
Windows: set TVG_EXPORT to dllexport also for mingw
In addition, remove TVG_EXPORT from enum class. They are types
not symbols
Change-Id: Ia435f86f8bba34093418d7f5699fdc2934f4a21d
JunsuChoi [Fri, 19 Aug 2022 05:09:50 +0000 (14:09 +0900)]
sw_engine: Fix uninitialized variable
warning message
[35/42] Compiling C++ object src/libthorvg-0.dll.p/lib_sw_engine_tvgSwRaster.cpp.obj
In file included from ../src/lib/sw_engine/tvgSwRasterTexmap.h:96,
from ../src/lib/sw_engine/tvgSwRaster.cpp:83:
../src/lib/sw_engine/tvgSwRasterTexmapInternal.h: In function 'void _rasterPolygonImageSegment(SwSurface*, const SwImage*, const SwBBox*, int, int, uint32_t (*)(uint32_t), AASpans*)':
../src/lib/sw_engine/tvgSwRasterTexmapInternal.h:76:9: warning: 'maxx' may be used uninitialized [-Wmaybe-uninitialized]
76 | if (x2 > maxx) x2 = maxx;
| ^~
../src/lib/sw_engine/tvgSwRasterTexmapInternal.h:33:19: note: 'maxx' was declared here
33 | int32_t minx, maxx;
| ^~~~
../src/lib/sw_engine/tvgSwRasterTexmapInternal.h:75:9: warning: 'minx' may be used uninitialized [-Wmaybe-uninitialized]
75 | if (x1 < minx) x1 = minx;
| ^~
../src/lib/sw_engine/tvgSwRasterTexmapInternal.h:33:13: note: 'minx' was declared here
33 | int32_t minx, maxx;
| ^~~~
Change-Id: If2f71a4de21d013dc2519d15802889dc2d4d1174
Vincent Torri [Wed, 17 Aug 2022 10:17:21 +0000 (12:17 +0200)]
Windows: use _fullpath() instead of fullpath().
Fix compilation error
Change-Id: Ic55f5da51f834e986d5005e835eb437bc0d3f318
Hermet Park [Thu, 4 Aug 2022 07:54:37 +0000 (16:54 +0900)]
loaders raw: fix a compiler warnings on Windows.
fix the invalid conversion from float to uint32_t.
@Issue: https://github.com/Samsung/thorvg/issues/1229
Change-Id: Ibd48c94e23661704ebf6efadfd0b1d098fa87c6a
Omar Polo [Sat, 11 Jun 2022 10:18:48 +0000 (12:18 +0200)]
fix OpenBSD compile issue
Linux seems the only system AFAICS to have alloca.h. All the BSDs have
the declaration in stdlib.h
Change-Id: I82d18c5ca92bb788eb175a2ce9acf418ac19053c
jykeon [Thu, 9 Mar 2023 05:56:00 +0000 (14:56 +0900)]
Bump Up 0.8.2
Change-Id: I185d1dc28c6c5d43af3694bdd9b8b50dd3482cdb
Signed-off-by: jykeon <jykeon@samsung.com>
Rémi Verschelde [Mon, 23 May 2022 16:35:10 +0000 (18:35 +0200)]
Format code files with dos2unix, ensure newline at EOF
Change-Id: I08dab1f492d295fdb9d9a4fb451578778be5b77a
Hermet Park [Sun, 5 Jun 2022 06:26:39 +0000 (15:26 +0900)]
updated AUTHORS
Change-Id: I742c4218567fe464afa5f2ac5821f6dbce9a79ca
Rémi Verschelde [Mon, 23 May 2022 17:30:42 +0000 (19:30 +0200)]
Cleanup FreeBSD preprocessor checks (if vs ifdef)
Should be equivalent but checking if the value is defined (`#ifdef`) is cleaner
than checking if it is set to something different from 0 (`#if`).
Change-Id: Ia6ae21fdf9f211ebd9ca1199e77794077c5ac23e
Martin Liska [Mon, 23 May 2022 10:11:23 +0000 (12:11 +0200)]
Fix building with GCC 13.
Fixes the following error:
../src/lib/tvgLzw.h:27:5: error: ‘uint8_t’ does not name a type
Change-Id: Ibfc07d633be35634d0662b866c291781c2e7bf6a
Hermet Park [Tue, 17 May 2022 12:54:40 +0000 (21:54 +0900)]
fix FreeBSD compile issue.
alloca is defined in stdlib.h on [freeBSD](https://www.freebsd.org/cgi/man.cgi?alloca)
additional fix to
75c1314ab0297f59cc26b7876d7b60e751d4d85c
Change-Id: I45f281d100a6daaa911752a9d709da0e504b505d
Peter Vullings [Fri, 13 May 2022 15:17:30 +0000 (03:17 +1200)]
Improve support for clang-cl on windows
* Better support for clang-cl on windows
* Fix runtime error caused by removing unwind tables
Change-Id: If794b2d1db46c1353bc3b9c391656ff6fa0c6c32
mundusnine [Thu, 12 May 2022 16:28:21 +0000 (12:28 -0400)]
Fix on FreeBSD
Fix compile errors on FreeBSD.
- alloca is defined in stdlib.h on [freeBSD](https://www.freebsd.org/cgi/man.cgi?alloca)
Issue in [godot](https://cirrus-ci.com/task/
5485473287110656?logs=build#L657)
Change-Id: I074c7cfedb798f4d033e562309498f1b701860be
jykeon [Tue, 7 Mar 2023 02:09:28 +0000 (11:09 +0900)]
Bump up 0.8.1
Change-Id: I300e33fe476248deb6055d3c9057e203343d278e
Signed-off-by: jykeon <jykeon@samsung.com>
JunsuChoi [Fri, 6 May 2022 00:53:00 +0000 (09:53 +0900)]
svg2png: Add more error message types
Add a message according to the returned Result type.
Change-Id: Ic456f871c48970a7c480e85efa33a219a44ad908
JunsuChoi [Wed, 4 May 2022 01:23:20 +0000 (10:23 +0900)]
svg_loader: Fix invaild '<' nested check
When Type is DOCTYPE, Child Entities start with '<'.
This condition is valid when general Elements (svg, g, path etc) are used.
Add a Doctype check to if condition.
(There can be various cases related to '<' nested case.
But for now, I only add Doctype considering the side effect.)
Change-Id: I205a900ac4765d6017f6ddc68c52907e932ce333
Hermet Park [Thu, 7 Apr 2022 14:04:44 +0000 (23:04 +0900)]
Update README.md
Change-Id: I1ff83a0d72fa00dc9129ca65f381fc9025a3f450
projectitis [Wed, 6 Apr 2022 07:24:04 +0000 (19:24 +1200)]
Fix readme
Change-Id: I5886887965217cd3478dbcac42e354f55607f27f
projectitis [Wed, 6 Apr 2022 07:21:43 +0000 (19:21 +1200)]
Updated branding
Change-Id: I8e56322864b0085aa49dd52eb7e0941d4d82a103
mgrudzinska [Sun, 3 Apr 2022 21:33:35 +0000 (23:33 +0200)]
svg_loader: clearing the parser stop flags
Change-Id: I60a2969df2b7105309d58751c1b4f80f34ca7f1d
mgrudzinska [Sun, 3 Apr 2022 22:02:43 +0000 (00:02 +0200)]
svg_loader: fixing color parsing
Color given in percentages, ex."rgb(10%,20%,30%)", was incorrectly parsed.
Change-Id: I0f81796c2b4e548564a5cb6ea1d374f706112245
mgrudzinska [Sun, 3 Apr 2022 20:32:26 +0000 (22:32 +0200)]
svg_loader: fixing segf when passing a nullptr to strcmp
This occurred when a gradient has no 'id' attribute.
Change-Id: I8b4204a657e4ea6fd298bcbfd244a09a46f05d11
mgrudzinska [Tue, 22 Mar 2022 22:50:24 +0000 (23:50 +0100)]
sw_engine: fixing oveflow
An overflow occurred for big shapes with a dashed stroke,
since a contour end points were stored as the uint16 type
(instead of the uint32 type).
Change-Id: Ibb50aab2dd8114aa615714f05e8a564365f7efe7
mgrudzinska [Sun, 20 Mar 2022 17:27:34 +0000 (18:27 +0100)]
svg_loader: symbol node without any viewbox/width/height info handled properly
Change-Id: I60a720306fa6c2ae06aa87e7666abba7289dab6d
Rémi Verschelde [Wed, 16 Mar 2022 14:28:53 +0000 (15:28 +0100)]
build: Add another `<cstring>` include for MinGW compatibility
Change-Id: Ib3179c8997cfbfd0a2bf671cc7481b1b3d40afcf
Hermet Park [Thu, 10 Mar 2022 02:46:19 +0000 (11:46 +0900)]
Update README.md
Change-Id: I310899045708d5018422ab205dc989c22dc6ad76
Mira Grudzinska [Mon, 7 Mar 2022 02:32:02 +0000 (03:32 +0100)]
svg_loader: width and height attribs of the use element applied
Change-Id: Ic08932e9a46498e71259d64ff8ac2ad20d3ab9d5
jykeon [Fri, 3 Mar 2023 01:27:17 +0000 (10:27 +0900)]
Bump up 0.8.0
Change-Id: I7a0d5530ed1858013036f648b20b2e075224513e
Signed-off-by: jykeon <jykeon@samsung.com>
Hermet Park [Tue, 8 Mar 2022 10:03:21 +0000 (19:03 +0900)]
just released v0.8.0
Change-Id: Ia5e7abe1ee6080cf3bf9ec85653b94b1486ff735
Hermet Park [Tue, 8 Mar 2022 09:38:59 +0000 (18:38 +0900)]
examples - updated a resource usage
Change-Id: I03f6ec33f3891be6c244b8e127469a88c09324cd
Hermet Park [Tue, 8 Mar 2022 09:25:48 +0000 (18:25 +0900)]
prepare tvg v0.8 release
updated tvg binaries, back up them for backward compatibility test.
Change-Id: I4aaef868ccc4cd807460592e640820441c9b6fd0
mgrudzinska [Sun, 27 Feb 2022 01:24:18 +0000 (02:24 +0100)]
common: viewport values improperly rounded
For a very specific scaling factors shapes were to much clipped
because of wrong rounding of the viewport.
Change-Id: Icfd42938c3754c91381565e0b114ca7168f33726
mgrudzinska [Wed, 23 Feb 2022 21:53:41 +0000 (22:53 +0100)]
svg_loader: use node fixed
By mistake the use node was improperly transformed and/or displayed
for a reference node other than a symbol node.
Change-Id: I2b6a4bae1a3027e1726725a7a70773c58928b7a8
mgrudzinska [Wed, 23 Feb 2022 20:34:15 +0000 (21:34 +0100)]
svg_loader: symbol preserveAspectRatio attribute fixed
The symbol node was properly scaled only for 'preserveAspectRatio=none'.
Now it works also for the default value of this attribute (xMidYMid).
Change-Id: I8f77eac6cd28eb598622ec56e645d6cbea671944
mgrudzinska [Wed, 23 Feb 2022 20:22:55 +0000 (21:22 +0100)]
svg_loader: preserveAspectRatio fix
The default value should be xMidYMid, now it is.
Change-Id: Idb347ed847f4ac19f687f4dfc7c7507a8ca0abbe
Hermet Park [Mon, 21 Feb 2022 02:28:02 +0000 (11:28 +0900)]
svg_loader: handle the exception properly.
viewBox doesn't expect the missing attributes,
it won't have any default values.
So we can decide the fault when the values are missed.
Change-Id: I99a1e97d6d5bd569cf53d1eca2d4d4905a69e08b
Mira Grudzinska [Thu, 17 Feb 2022 00:47:17 +0000 (01:47 +0100)]
svg_loader: fixing symbol transformation
For a Symbol node, the transformation based on the 'viewBox', 'width'
and 'height' attributes has to be applied before the transformation
based on the 'transformation' attribute.
Change-Id: I72fe990e5c95f0f73aec6c77124d4017e8227a65
Mira Grudzinska [Wed, 16 Feb 2022 00:45:26 +0000 (01:45 +0100)]
svg_loader: symbol++
- The initial value of the overflow attribute was missing
- overflow="visible" was missing scaling
Change-Id: I25b68a37ba154878a6c966b6c38e0214040bbc35
Mira Grudzinska [Tue, 1 Feb 2022 19:55:15 +0000 (20:55 +0100)]
svg_loader: symbol tag implemented
The 'symbol' tag introduced. It can be used to define graphical
template objects which can be instantiated by a 'use' tag.
Change-Id: I48c000156e764c039a9d27e5a205a226909d2edf
Hermet Park [Wed, 16 Feb 2022 03:22:53 +0000 (12:22 +0900)]
jpeg_loader: resolve the asan bug report.
fix the invalid negative shift operations.
@Issue: https://github.com/Samsung/thorvg/issues/1172
Change-Id: I36aac7ecc1869464a5be9cbabf69cd3120d894a2
Hermet Park [Mon, 14 Feb 2022 05:38:03 +0000 (14:38 +0900)]
examples: adds a new sample svg
Change-Id: I541117f38dee2fbf11d3fc9a7fd5c255d0e17ed5
jykeon [Thu, 2 Mar 2023 01:31:00 +0000 (10:31 +0900)]
Bump up 0.7.9
Change-Id: Iaacfb1959ac48a334562dea752c14af8c530e434
Signed-off-by: jykeon <jykeon@samsung.com>
Mira Grudzinska [Wed, 9 Feb 2022 18:25:00 +0000 (19:25 +0100)]
svg_loader: fixing memory leak
The css style node was improperly freed.
Change-Id: I362ea9d30d974a65ddc45e167ef755b260722d56
JunsuChoi [Thu, 10 Feb 2022 01:50:57 +0000 (17:50 -0800)]
infra: Disable unit test in window CI
Symbol file generation for compiling test code in CI fails.
It's not caused by recent patches.
We don't test until we know the exact cause.
However, loader test is added to check the safety of window build.
Error Log
[45/68] Generating symbol file src/thorvg-0.dll.p/thorvg-0.dll.symbols
FAILED: src/thorvg-0.dll.p/thorvg-0.dll.symbols
"C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts\meson" "--internal" "symbolextractor" "D:\a\thorvg\thorvg\build" src/thorvg-0.dll "src\thorvg.lib" src/thorvg-0.dll.p/thorvg-0.dll.symbols
Change-Id: I03401e691d7a21b59ab2f1a2e40ddbdf4062be08
Mira Grudzinska [Wed, 9 Feb 2022 18:39:08 +0000 (19:39 +0100)]
svg_loader: preventing invalid log msg
Change-Id: I3f93189028debb1c9449bc085d2849c3156c035d
Mira Grudzinska [Mon, 7 Feb 2022 01:39:48 +0000 (02:39 +0100)]
svg_loader: proper image transformation
One of the image's attributes can be a transformation matrix.
Now it's applied.
Change-Id: I7056aa0a5deff519bf60e5fd99b4786c2a6cb8bf
Mira Grudzinska [Fri, 4 Feb 2022 17:59:00 +0000 (18:59 +0100)]
svg_loader: the 'use' node properly transformed
The translation of the use node shouldn't overwrite its transformation.
Change-Id: Ibc6761404bc98bd5a82ac1c2d76bf664a98e5d91
Mira Grudzinska [Tue, 1 Feb 2022 22:34:41 +0000 (23:34 +0100)]
svg_loader: fixing the used mask-type
For the performance reasons, regardless of the set/default
mask-type value, if the mask is white, the alpha masking is
used. To qualify a mask as white, not only its fill has to be
checked, but its stroke as well. The second was missing.
Change-Id: I407ec17f1b8dfd8fda5948319cf11bd609e7ab91
Hermet Park [Tue, 8 Feb 2022 09:43:03 +0000 (18:43 +0900)]
svg_loader: code refactoring.
follow strict coding-style.
no logic changes.
Change-Id: Iab335dbafe4a32f321244f7df8068176f069d2c9
Hermet Park [Tue, 8 Feb 2022 09:02:20 +0000 (18:02 +0900)]
example: just renamed the svg file.
Change-Id: Ib880280971d5d2d93cab3b59938e94e230b7a4f5
Mira Grudzinska [Tue, 25 Jan 2022 11:38:49 +0000 (12:38 +0100)]
example: cssStyle.svg add
For now it's a simple file used to check the styling precedence
and overall correctness.
After the css stylling will be fully introduced a more complex file
can be used,
Change-Id: I10fe2b7d4c201e29893ab6a919d132a2e2a47e24
jykeon [Mon, 27 Feb 2023 10:12:37 +0000 (19:12 +0900)]
Bump up 0.7.8
Change-Id: Ib9bd24a04afecb67ba77e560119dddc7b0b2219a
Signed-off-by: jykeon <jykeon@samsung.com>
Mira Grudzinska [Sat, 29 Jan 2022 22:08:53 +0000 (23:08 +0100)]
svg_loader: fixing css style for group selectors, clips/masks
The css styling has to be applied as the first step of the node
updates. Whereas the updateStyle function should be called
as the last step, after all other node updates are made.
Change-Id: I59d11f6d372ff4f32c22b067edff90b552900ef8
Mira Grudzinska [Fri, 28 Jan 2022 23:40:09 +0000 (00:40 +0100)]
svg_loader: css style functions moved to a separate file
Change-Id: I6ea53062f358e0128a3b8eafba4e6217b7b9666e
Mira Grudzinska [Fri, 28 Jan 2022 00:42:02 +0000 (01:42 +0100)]
svg_loader: styling++ (no logical changes)
Change-Id: I8cde1a51aaf567aa65b9cb838bd39242a8e4d61f
Mira Grudzinska [Thu, 27 Jan 2022 21:58:52 +0000 (22:58 +0100)]
svg_loader: fixing cdata block reading
The CData block is read if it's inside the style tag.
In a case when the CData block was just after the style
block, the data was still read, although it shouldn't be.
Fixed.
Change-Id: I3cd242d0738475c0cc986f6dc8a375e3b9d5b7a5
Mira Grudzinska [Tue, 25 Jan 2022 11:20:22 +0000 (12:20 +0100)]
svg_loader: tvg styling applied to the code
Change-Id: I836926e52873e836c7dfdd64eae8ab56f0e4fe5d