Commit graph

1586 commits

Author SHA1 Message Date
Hermet Park
70cc0bb302 doc: updated logo
also move the logo folder in the res.
2022-04-07 23:29:56 +09:00
Hermet Park
ff685e9a35
Update README.md 2022-04-07 23:04:44 +09:00
projectitis
6addd574dc Fix readme 2022-04-07 22:56:33 +09:00
projectitis
89bb9783d8 Updated branding 2022-04-07 22:56:33 +09:00
mgrudzinska
0da0f5fa46 svg_loader: clearing the parser stop flags 2022-04-05 20:07:33 +09:00
mgrudzinska
eb7b281898 svg_loader: fixing color parsing
Color given in percentages, ex."rgb(10%,20%,30%)", was incorrectly parsed.
2022-04-05 19:36:15 +09:00
mgrudzinska
470b885e65 svg_loader: fixing segf when passing a nullptr to strcmp
This occurred when a gradient has no 'id' attribute.
2022-04-03 22:42:26 +02:00
mgrudzinska
0925aa84a5 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).
2022-03-23 16:14:51 +09:00
mgrudzinska
1e8b8cbb53 svg_loader: symbol node without any viewbox/width/height info handled properly 2022-03-21 18:38:10 +09:00
Rémi Verschelde
bc5c29dd69 build: Add another <cstring> include for MinGW compatibility 2022-03-16 23:51:12 +09:00
Hermet Park
5122792ee5
Update README.md 2022-03-10 11:46:19 +09:00
Hermet Park
d120084b7c just released v0.8.0 2022-03-08 19:03:21 +09:00
Hermet Park
45fd5ffeed doc: updated to v0.8.0 2022-03-08 19:02:56 +09:00
Hermet Park
49c6336b33 examples - updated a resource usage 2022-03-08 18:39:32 +09:00
Hermet Park
6276175d5b prepare tvg v0.8 release
updated tvg binaries, back up them for backward compatibility test.
2022-03-08 18:25:48 +09:00
Mira Grudzinska
2ee25ea11d
svg_loader: width and height attribs of the use element applied 2022-03-07 11:32:02 +09:00
mgrudzinska
59399e8597 common: viewport values improperly rounded
For a very specific scaling factors shapes were to much clipped
because of wrong rounding of the viewport.
2022-03-07 11:30:20 +09:00
mgrudzinska
ed3608b39b 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.
2022-03-02 17:18:13 -08:00
mgrudzinska
b16d60d509 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).
2022-03-02 17:18:01 -08:00
mgrudzinska
d1e7d60fc9 svg_loader: preserveAspectRatio fix
The default value should be xMidYMid, now it is.
2022-03-02 17:17:54 -08:00
Hermet Park
bdda2586e9 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.
2022-02-23 15:02:17 +09:00
Mira Grudzinska
c214532ad2 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.
2022-02-21 11:21:22 +09:00
Mira Grudzinska
72ab9268e3 svg_loader: symbol++
- The initial value of the overflow attribute was missing
- overflow="visible" was missing scaling
2022-02-21 11:21:22 +09:00
Mira Grudzinska
70ed0653f1 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.
2022-02-21 11:21:22 +09:00
Hermet Park
ccce0d7641 jpeg_loader: resolve the asan bug report.
fix the invalid negative shift operations.

@Issue: https://github.com/Samsung/thorvg/issues/1172
2022-02-16 12:45:37 +09:00
Hermet Park
143cb83515 examples: adds a new sample svg 2022-02-14 14:38:39 +09:00
Mira Grudzinska
23ea4ed9f1 svg_loader: fixing memory leak
The css style node was improperly freed.
2022-02-14 14:35:09 +09:00
JunsuChoi
0a1606aed3 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
2022-02-10 12:56:09 +09:00
Mira Grudzinska
87832a9236 svg_loader: preventing invalid log msg 2022-02-09 19:52:35 +01:00
Mira Grudzinska
6a589777b0 svg_loader: proper image transformation
One of the image's attributes can be a transformation matrix.
Now it's applied.
2022-02-08 19:49:39 +09:00
Mira Grudzinska
2fce4d46a0 svg_loader: the 'use' node properly transformed
The translation of the use node shouldn't overwrite its transformation.
2022-02-08 19:47:09 +09:00
Mira Grudzinska
d1fc538429 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.
2022-02-08 19:46:40 +09:00
Hermet Park
ff3ebd9abd svg_loader: code refactoring.
follow strict coding-style.

no logic changes.
2022-02-08 18:57:11 +09:00
Hermet Park
5f40449c3d example: just renamed the svg file. 2022-02-08 18:02:20 +09:00
Mira Grudzinska
0e4211fb96 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,
2022-02-08 18:01:00 +09:00
Mira Grudzinska
1aaf222b62 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.
2022-02-08 17:58:53 +09:00
Mira Grudzinska
ada4d5e261 svg_loader: a css style node shouldn't have a parent
This node is supposed to be separeted from the main tree nodes.
2022-02-08 17:58:53 +09:00
Mira Grudzinska
5aab26302a svg_loader: css style functions moved to a separate file 2022-02-08 17:58:53 +09:00
Mira Grudzinska
863a98870f svg_loader: styling++ (no logical changes) 2022-02-08 17:58:53 +09:00
Mira Grudzinska
4a7310756d 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.
2022-02-08 17:58:53 +09:00
Mira Grudzinska
fbc596c09b svg_loader: tvg styling applied to the code 2022-02-08 17:58:53 +09:00
Mira Grudzinska
ed81446031 svg_loader: custom _strndup added
For the compatibility reasons a custom version of strndup is
introduced.
2022-02-08 17:58:53 +09:00
Mira Grudzinska
dc518a83c8 svg_loader: some names changed, no logical changes 2022-02-08 17:58:53 +09:00
Mira Grudzinska
a5e5e48de4 svg_loader: restoring changes from ed3b17b228
(preventing memcpy from a nullptr)
2022-02-08 17:58:53 +09:00
Mira Grudzinska
b535803136 svg_loader: css styling supported also when defs were postponed
Defs can be defined at the end of the file. In such a case each
node with a defined class attribute has to be marked and checked
at the final stage of processing - the proper style node has to be found
and its style has to be applied.
2022-02-08 17:58:53 +09:00
Mira Grudzinska
85f23d7f6c svg_loader: supporting different target formats in css
Css styling supports now targets defined only by tag or only by name
(tag.name was already supported before).
Also proper precedence of a styling is fixed - flags were not set.
2022-02-08 17:58:53 +09:00
Mira Grudzinska
abd959bb54 svg_loader: proper precedence of a styling
The attribute values should be copied from a style node only if they
were set in the destination node using the attributes (in opocity to
a style attribute). A proper copyCssStyleAttr() function is introduced.
2022-02-08 17:58:53 +09:00
Mira Grudzinska
1799cd9a78 svg_loader: remove unnecessary variables 2022-02-08 17:58:53 +09:00
Mira Grudzinska
482add35e9 svg_loader: buflen arg used in the simpleXmlParseW3CAttribute()
While parsing the css internal style sheets the buflen has to be passed.
2022-02-08 17:58:53 +09:00
Mira Grudzinska
c351391bd5 svg_loader: additional check while style parsing
This check is needed so the function can be used to parse
not only the inline styles, but also the css internal style sheet.
2022-02-08 17:58:53 +09:00