Hermet Park
10f80fa832
test Picture: add Picture unit tests
2021-07-02 14:02:09 +09:00
Hermet Park
8aa941c4ab
common picture: ++exception case.
...
Fixed load() to return InvalidArgument if the file path is invalid.
2021-07-02 14:01:52 +09:00
JunsuChoi
113ca8b845
svg_loader SvgPath: Added corner case handling for flags of Arc
...
Moved the if statement to check if it is a float.
This patch is that reverts and fixes the reverted patch 55a5b9.
2021-07-02 12:49:00 +09:00
Hermet Park
1b94ff63ef
infra: ++ strict build test
...
Enable png loader in default.
2021-07-02 12:07:53 +09:00
Hermet Park
3f176b733b
common picture: ++ exception case.
...
size() returns InsufficientCondition if it doesn't have any loaded data.
2021-07-02 12:07:34 +09:00
Hermet Park
27cac72d7d
test Shape: add Shape unit tests
2021-07-02 10:38:28 +09:00
Hermet Park
2fd830c940
common shape: allow to reset stroke dash.
...
user may need to reset stroke dash to off,
now stroke api allows it.
2021-07-02 10:35:46 +09:00
Hermet Park
97302d2983
test scene: revert section usage.
...
Dismiss this usage for consistency.
Yet we have no practical necessity,
we can apply this to *all test suites later.
2021-07-01 20:41:07 +09:00
Hermet Park
55a5b9492b
Revert "svg_loader SvgPath: Added corner case handling for flags of Arc"
...
This reverts commit 5da4c81138
.
Please double-check this regression bug:
examples/images/samsung-galaxy-s.svg
2021-07-01 18:04:25 +09:00
Hermet Park
e74ce7e315
sw_engine: --sanitizer errors
...
runtime error: load of value 190, which is not a valid value for type 'bool'
@Issue: https://github.com/Samsung/thorvg/issues/544
2021-07-01 17:59:27 +09:00
Hermet Park
480bd8376e
common array: -- sanitizer errors
...
runtime error: null pointer passed as argument 1, which is declared to never be null
@Issue: https://github.com/Samsung/thorvg/issues/543
2021-07-01 17:41:56 +09:00
Hermet Park
e1eabf7dc3
Revert "sw_engine: stop-opacity value should be interpolated between stops"
...
This reverts commit ac95433b53
.
Ahh this breaks examples/images/rg1024_eggs.svg
2021-07-01 17:34:59 +09:00
Hermet Park
397becee46
update CONTRIBUTING
2021-07-01 12:59:20 +09:00
Hermet Park
cf2b0c4620
Update CONTRIBUTING.md
2021-07-01 12:50:09 +09:00
Hermet Park
870948ea32
res: updated images
2021-07-01 12:26:52 +09:00
Mira Grudzinska
f411b5a64c
svg_loader: recalculating the default values of grads
...
The default values of gradient properties were handled differently
than the values given by a user/in an svg file.
2021-07-01 12:15:55 +09:00
Hermet Park
1154986a58
sw_engine: fix broken MSVC compatibility.
...
error: use of undeclared identifier 'ulong'
@Issue: https://github.com/Samsung/thorvg/issues/541
2021-07-01 12:06:18 +09:00
Mira Grudzinska
ac95433b53
sw_engine: stop-opacity value should be interpolated between stops
...
The opacity value is interpolated as are all color channels.
2021-06-30 19:32:52 +09:00
Michal Maciola
3086f28b55
svg_loader: allow multiple <defs> tags without data and memory leak ( #528 )
...
* svg_loader: allow multiple defs without data and memory leak
If the svg file contained multiple <defs> tags, each subsequent tag
overwritten the previous tag. This resulted in incorrect rendering of the
file and memory leaks.
@Issues: 491
* svg_loader: allow multiple defs without data and memory leak- fix #1
Changed the idea to abandon node creating instead of deleting it after
creation. Removed simpleXmlParseAttributes for _createDefsNode.
2021-06-30 17:21:30 +09:00
Hermet Park
19a3190245
svg_loader: fix a infinite loop error by circular dependency.
...
Composition can be applied recursively if its children nodes have composition target to this one.
This can be occured by wrong svg description, and tvg prevents this exception case.
@Issue: https://github.com/Samsung/thorvg/issues/494
2021-06-30 16:12:16 +09:00
Hermet Park
bb68a2d514
infra: ++ strict build test
...
Enable log in default.
2021-06-30 15:18:40 +09:00
Hermet Park
fcbc77bcdf
svg_loader: code refactoring
...
unify to tvg fill rule.
2021-06-30 15:18:14 +09:00
Hermet Park
2c24a1fa5e
svg_loader: recover partial code from 3e7888b538
...
oops, log was not tested in the patch...
2021-06-30 15:12:15 +09:00
Hermet Park
571a1e5caa
svg_loader: code refactoring
...
remove more unused declarations...
2021-06-30 14:54:22 +09:00
Hermet Park
3e7888b538
svg_loader: code refactoring
...
use color structure to keep neat & compact code.
2021-06-30 14:54:12 +09:00
Hermet Park
8dc5d5204b
svg_loader: code refactoring
...
remove unused declaration.
2021-06-30 13:47:22 +09:00
Hermet Park
6a79d2c06e
svg_loader: fix the inifite loop bug when size has 'em' unit.
...
svg may have 'em' unit for fonts, strtof() must handle this case to not
drop in the infinite loop.
Yet thorvg doesn't support font feature in svg,
it must multiply values with font size if those values have 'em' size.
@Issue: https://github.com/Samsung/thorvg/issues/488
2021-06-30 11:27:31 +09:00
Hermet Park
38fa5107bf
sw_engine rle: -- sanitizer reports.
...
The code is actually intended, we can modify it to ignore the
annoying sanitizer reports.
@Issue: https://github.com/Samsung/thorvg/issues/483
2021-06-29 15:56:11 +09:00
Hermet Park
c31156e737
sw_engine renderer: fix a broken composition bug
...
tvg sw_engine tries to skip composition as far as its doable,
it tries composition only if the translucent shape with stroking is there.
There has been a condition bug that composition is applied unnecessarily
even if stroking is disabled. This resulted in broken blending
at gradient filling since it applied alpha values multiple times.
Issues:
https://github.com/Samsung/thorvg/issues/445
2021-06-29 14:44:09 +09:00
Mira Grudzinska
feb71ff36c
svg_loader: currentColor - inheritance from a parent
...
The 'currentColor' attribute value was not inherited. Fixed.
2021-06-29 09:27:52 +09:00
Michal Maciola
520d6e7bbd
svg_loader: negative attrs length fix
...
After finding no attributes but white spaces, attrs length could be negative
that resulted in segmentation fault in simpleXmlParseAttributes function.
@Issue: #487
2021-06-28 16:46:26 +09:00
Hermet Park
78bb8d1f2e
svg_loader: fix trivial build warnings.
...
../src/loaders/svg/tvgSvgLoader.cpp: In function ‘void _copyAttr(SvgNode*, const SvgNode*)’:
../src/loaders/svg/tvgSvgLoader.cpp:1598:60: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘struct SvgStyleProperty’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(to->style, from->style, sizeof(SvgStyleProperty));
@Issue: 498
2021-06-28 13:47:15 +09:00
Mira Grudzinska
57a22b8462
svg_loader: finish the search after founding the proper color
...
In the _toColor func, after founding the proper color, the search
should be finiched.
2021-06-28 11:32:44 +09:00
Mira Grudzinska
f477933098
svg_loader: applying opacity to the gradient
...
Before this change the 'stroke-opacity' and the 'fill-opacity'
grad style attributes were not taken into account.
2021-06-28 10:34:14 +09:00
Mira Grudzinska
6eea979dae
common: introducing the composite API (getter)
...
The new API gets the composite method and the pointer to the composite
target of the given paint object.
2021-06-25 22:16:06 +09:00
Mira Grudzinska
96d6b47a64
common: PaintType enum changed to identifier in Paint class
...
The PaintType enum was used to set the paint type in the internal Paint
implementation. This solution is switched to an identifier with id() getter,
so that the information about the type can be reached from outside the Paint.
2021-06-25 22:13:20 +09:00
Hermet Park
bf39e0fea9
Update README.md
...
@mgrudzinska I don't know this makes you understand, you can suggest if you have a better phrase.
2021-06-25 10:49:08 +09:00
K. S. Ernest (iFire) Lee
affa809a2c
Use spellcheck
2021-06-25 10:43:34 +09:00
Hermet Park
a6f9ec3080
svg_loader: fix memory violation issues.
...
copy attribute must copy the url data,
otherwise, url memory can be atempted freeing twice.
also, fix the memory leak in multiple composition case.
2021-06-25 10:28:27 +09:00
Hermet Park
940b8b566f
Update README.md
2021-06-24 23:02:32 +09:00
Mira Grudzinska
286f700305
svg_loader: handling the ColorStop offset values
...
The ColorStop offset < 0 and > 1 should be treated as 0 and 1 respectively.
The offset value < than the previous offset value should be replaced
by the previous value - without this change segfault occurred.
Validating the APIs parameters values is the user responsibility.
2021-06-24 20:54:03 +09:00
Hermet Park
750ad90bf0
sw_engine stroke: set stroke invalid if points are zero.
...
This valid tag is used for further progress.
we don't need it actually since we can count by points number.
2021-06-24 20:50:37 +09:00
Hermet Park
86fd0f67cf
svg_loader: prevent heap memory overflow.
...
if the input points are odd-numberd by invalid svg data, it could access invalid memory.
Prevents it just in case.
2021-06-24 16:54:07 +09:00
JunsuChoi
5da4c81138
svg_loader SvgPath: Added corner case handling for flags of Arc
...
It handles the case what the flag of the arc of the path is defined
without spaces or commas, such as 00, 01, 11 or 10.
2021-06-24 08:52:30 +02:00
JunsuChoi
b17f3cc9a4
svg2png: Clean up code
...
Modify the code to fit coding style
2021-06-24 11:31:15 +09:00
Hermet Park
a459a53bc7
svg2png: revise code to fix memory violation.
...
previous code didn't take care of multi-threading.
This revise code to avoid changing canvas buffer during multi-tasking.
2021-06-24 10:52:44 +09:00
Hermet Park
59f189bcb4
Update tvgSwMath.cpp
...
fix typo.
2021-06-23 22:46:41 +09:00
Hermet Park
80090e1189
tvg_loader: recover wrongly introduced change by my mistake.
2021-06-23 19:48:10 +09:00
Hermet Park
c2b84dc500
+++
2021-06-23 18:59:26 +09:00
Hermet Park
135cba001f
tvg_loader: code refactoring.
...
keep it neat & clean code for better readibility and maintenence.
2021-06-23 18:59:26 +09:00