Commit graph

714 commits

Author SHA1 Message Date
Hermet Park
00dc7fb04f
Update CONTRIBUTING.md 2021-05-11 22:23:35 +09:00
Mira Grudzinska
924ea15cfa capi: added check against null pointer before dereferencing
TVG_RESULT_INVALID_ARGUMENT returned in case a nullptr passed as an argument
(does not apply to color getters).
The change is addressed in the docs file.
2021-05-11 12:09:23 +02:00
Mira Grudzinska
335880c58c docs: polishing up the C API docs 2021-05-06 14:12:37 +02:00
Hermet Park
557ad2daf3
Update README.md 2021-05-03 21:14:52 +09:00
Hermet Park
814cfe2f3b
Update README.md 2021-05-03 19:25:30 +09:00
JunsuChoi
475fc22f6d loader SvgLoader: Fix memory leak
Add memory release for style->comp.url, which is the leaking memory.

[Valgrind Test Result]
==21595== 32 bytes in 1 blocks are definitely lost in loss record 29 of 152
==21595==    at 0x4C3217F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21595==    by 0x5C248C6: _idFromUrl(char const*) (tvgSvgLoader.cpp:272)
==21595==    by 0x5C24DE1: _handleClipPathAttr(SvgLoaderData*, SvgNode*, char const*) (tvgSvgLoader.cpp:860)
==21595==    by 0x5C260CC: _attrParseGNode(void*, char const*, char const*) (tvgSvgLoader.cpp:953)
==21595==    by 0x5C2ABA9: simpleXmlParseAttributes(char const*, unsigned int, bool (*)(void*, char const*, char const*), void const*) (tvgXmlParser.cpp:272)
==21595==    by 0x5C26F6E: _createGNode(SvgLoaderData*, SvgNode*, char const*, unsigned int) (tvgSvgLoader.cpp:1063)
==21595==    by 0x5C27A04: _svgLoaderParserXmlOpen(SvgLoaderData*, char const*, unsigned int, bool) (tvgSvgLoader.cpp:2168)
==21595==    by 0x5C27CE9: _svgLoaderParser(void*, SimpleXMLType, char const*, unsigned int) (tvgSvgLoader.cpp:2226)
==21595==    by 0x5C2AC8C: simpleXmlParse(char const*, unsigned int, bool, bool (*)(void*, SimpleXMLType, char const*, unsigned int), void const*) (tvgXmlParser.cpp:378)
==21595==    by 0x5C27E09: SvgLoader::run(unsigned int) (tvgSvgLoader.cpp:2571)
==21595==    by 0x5C1A7C1: operator() (tvgTaskScheduler.h:68)
==21595==    by 0x5C1A7C1: tvg::TaskSchedulerImpl::run(unsigned int) (tvgTaskScheduler.cpp:138)
==21595==    by 0x5EED6DE: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
2021-05-03 16:29:30 +09:00
Mira Grudzinska
2a4898cd19 Update README.md
Fixed example and minor linguistic changes
2021-05-03 15:59:27 +09:00
Hermet Park
1638844dfc
Update README.md
updated contents
2021-05-02 00:19:14 +09:00
Hermet Park
89e712fd2b
Update README.md
+ Practices: Tizen, Rive
2021-05-01 23:50:07 +09:00
Hermet Park
379b46f4e0
Update README.md 2021-05-01 14:58:30 +09:00
Hermet Park
ea316a348a res: updated images 2021-05-01 14:54:15 +09:00
Hermet Park
6fce96a124 examples: fix wrong data size conversion.
pointer size becomes 32 to 64 bits up to machines.
it has to be 32 bits.
2021-05-01 12:56:49 +09:00
Hermet Park
2bd07c050c examples: fix wrong data size conversion.
pointer size becomes 32 to 64 bits up to machines.
it has to be 32 bits.
2021-05-01 12:49:23 +09:00
Hermet Park
1d923a8632 loader svg: fix build break due to typo 2021-05-01 12:37:45 +09:00
Michal Szczecinski
2f334f50c5 sw_engine: Added sanity checks.
This commit fixes crash when update target surface is not created yet.
2021-05-01 12:34:30 +09:00
Hermet Park
eafd46b7b7 infra: remove debian packaging.
thorvg doesn't belonged to any package distribution.
let tvg keep the meson build system and leave to pkg distrubtors
to organize their own building configures.
2021-05-01 12:31:37 +09:00
Hermet Park
9465915e84 res: update images. 2021-04-30 20:54:34 +09:00
Hermet Park
3a538340aa infra: disable capi in default.
capi is not mandatory option in v0.1.

we can manually toggle it on when it's necessary.
2021-04-30 19:15:05 +09:00
Hermet Park
28008e2f91
doc: polish up api documentation. 2021-04-30 18:53:20 +09:00
Michal Szczecinski
d4f1864c13
Merge pull request #367 from Samsung/devs/jsuya/doc_capi_groupping
doc common: Revise c api doc
2021-04-29 09:27:12 +02:00
JunsuChoi
3908397d95 doc common: Add enum and struct docs in capi 2021-04-29 15:06:54 +09:00
JunsuChoi
706df374cf doc common: Groupping c APIs
C APIs
 - Initializer
 - Canvas
  - SwCanvas
 - Paint
 - Shape
 - Gradient
 - Picture
 - Scene
2021-04-29 15:06:54 +09:00
Mira Grudzinska
6601c93899 sw_engine: fixing overlapping masks
The buffer to which the mask is rastered is only partially cleared.
If the object to which the mask is applied overlaps an area where
another mask was used, an erroneous image is generated. The buffer
clearing area has been increased to the size of the object to which
the mask is applied.
2021-04-29 12:13:38 +09:00
JunsuChoi
d7b3f0103e doc common: Add grouping of C++ api and C api
group ThorVG C++ APIs
group ThorVGCapi C APIs
2021-04-29 12:11:06 +09:00
Mira Grudzinska
ec1232b9b4 doc common: change of the return value in the composite API 2021-04-28 15:06:00 +02:00
Mira Grudzinska
d0dc9142ec common paint: changed result in composite API
A possible error is due to erroneous arguments, so
InvalidArgument is return instead of InsufficientCondition
2021-04-28 20:02:22 +09:00
JunsuChoi
94f3d0dc11 infra Actions: If no coding style error, no comment
and change action name
2021-04-28 19:53:45 +09:00
Mira Grudzinska
3d5006740c doc common: adding the documentation for the C++ APIs
Added the missing descriptions for Sw/Gl/Canvas and Initializer.
@retval command applied.
2021-04-28 19:46:58 +09:00
JunsuChoi
fa8b7b333e doc README: Update build status badge
The badge provided by travis-ci is no longer used.
Use the badge provided by github action.
2021-04-28 19:46:31 +09:00
JunsuChoi
6241fd054d doc common: Fix typo and missing parameter 2021-04-27 11:54:22 +02:00
JunsuChoi
638d81fb15 infra Travis: Remove travis-ci build test
We don't need to build test with travis-ci.
The build test is already being worked in the github-action.
In addition, travis-ci causes unnecessary failures because the recent request count is not properly counted.
2021-04-26 23:13:09 +09:00
Mira Grudzinska
7e35ec339a doc common: adding the documentation for the C++ APIs
The descriptions have been changed and new ones added.
There are still few apis for which descriptions are missing.
2021-04-25 17:16:13 -07:00
JunsuChoi
2cfc2bd241 doc common: Draft documentation for C++ header APIs
Write documentation for some of the APIs that have already been cleared up.
2021-04-21 17:57:24 +09:00
Hermet Park
e1ebcf6153 loaders svg: code refactoring
split functions as its purpose.
2021-04-21 11:12:22 +09:00
JunsuChoi
51e4757a3b loader SvgLoader: Fix wrong debug log
1.
Modify that attribute information used for use type
looks like it was used for g type.

2.
Fix clippath node looking like setting "none"
(clippath's display = false is intentional)
2021-04-21 11:11:37 +09:00
JunsuChoi
8b54b6768a loader SvgLoader: add locale-independent strtof function
strtof's behavior is changed by system locale.
https://linux.die.net/man/3/strtof

Because of this, strtof(10.0000) returns 0.0 in some locales.
When a given value string is locale-independent, strtof has to be
replaced to custom function.
2021-04-20 19:44:04 +09:00
Michal Szczecinski
3ae9832684 capi: Added Inverted Alpha Mask composition enumeration.
Added missing composite method. Backend supports this compostion type.
2021-04-20 17:59:22 +09:00
Hermet Park
b541a0654c loaders svg: ++safety
prevent buffer overflow just in case.
2021-04-20 17:49:48 +09:00
Mira Grudzinska
332012dd6b loader svg: displaying SVG images without the specified viewBox attribute
If no viewBox attribute is given, the height and width attributes are used
to establish the viewBox size. However, this information was not available
inside the scene builder, even though it was needed.
2021-04-15 04:34:44 -07:00
Hermet Park
f1feebf047 common: code refactoring.
renamed internal function, no logical changes.
2021-04-15 18:26:11 +09:00
Mira Grudzinska
a13561e9c5 sw_engine: adding a check before stroke fill dereference
The crash was observed for empty shapes.
2021-04-15 13:33:58 +09:00
Hermet Park
6276e209a7 common initializer: counting engine init count properly.
Manage the reference count in common so that
all common resources can be initialized/terminated identically.
2021-04-14 20:18:06 +09:00
Mira Grudzinska
0f9d3ff6e9 examples: ignoring pictures other than svgs in Stress.cpp
The picture->size() function does not work for raw/png pictures.
As a consequence enabling both, the svg and png file loaders,
resulted in the unintended behavior of the example.
2021-04-14 17:17:10 +09:00
JunsuChoi
5d81fe2446 loader SvgLoader: Fix for coding convention 2021-04-13 19:01:19 +09:00
JunsuChoi
b75e7ea91a loader SvgLoader: return null if transform attribute invalid
In transform matrix parsing, null is returned if any of the matrices are invalid.
2021-04-13 19:01:19 +09:00
Hermet Park
d3a73f7ee9 loaders svg: fix a wrongly handles the corner case.
Stop the internel loop quick as possible, and state must be reset.
2021-04-13 17:49:29 +09:00
Hermet Park
b3559ecf56 loaders svg: code refactoring.
keep it clean & neat within tvg coding convention.
2021-04-13 17:16:38 +09:00
Hermet Park
d2c04f6037 wasm: fix compile errors. 2021-04-09 22:18:57 +09:00
Hermet Park
352f843d2b sync versioning 0.1.0 2021-04-09 21:42:28 +09:00
Hermet Park
5c9016158e loader svg: fix composition(mask/clip) issue.
composition target missed transform of its source.

That brings incorrect composition area.

This fixes it.
2021-04-09 21:02:55 +09:00