Hermet Park
875e200767
common: code refactoring
...
removed invalid nullptr checks.
New allocation doesn't gurantee that returns nullptr when it's failed.
It's useless on the modern compliers and our policy respects it.
2021-11-01 12:09:32 +09:00
Mira Grudzinska
a9990be54c
sw_engine: incorrect matrix used
...
The invTransform should be used instead of transform - missed during
all the gradient changes.
2021-10-29 15:04:52 +02:00
Michal Maciola
00dfd55f18
SVG: Support geometry properties of use tag
...
This patch adds a support for geometry properties (x, y) of <use> tag
2021-10-29 14:10:44 +09:00
Mira Grudzinska
4db3087c45
svg_loader: gradient transformation properly applied
...
The final gradient transformation depends on the coordinate system.
It can not be applied during an svg loading. The transformation matrix
has to be passed via api for further gradient processing.
2021-10-29 10:58:43 +09:00
Mira Grudzinska
5ca50a28a2
sw_engine: variables names changed
...
Rasial gradient variables names changed to be more descriptive.
2021-10-29 10:55:06 +09:00
Mira Grudzinska
07c42cb32d
sw_engine: gradient transformation combined with the shape transformation
...
The gradient transformation has to be included in the last step
of gradient preparation (and combined with a shape transformation).
2021-10-29 10:55:06 +09:00
Mira Grudzinska
ae3d1e1b80
sw_engine: proper radial gradient transformation
2021-10-29 10:55:06 +09:00
Mira Grudzinska
362d2dfd0f
sw_engine: refactoring
...
The rasterization region was rearranged in the case of fastTrack,
but its validation and boundaries weren't check, causing segf in some
cases. Fixed.
2021-10-29 10:52:29 +09:00
Mira Grudzinska
ba25cb80eb
svg_loader: shape's bounds without a stroke
...
A shape's bounds used for a gradient transformation shouldn't take
a stroke into account.
2021-10-28 12:18:17 +02:00
JunsuChoi
71324e2e1d
infra action: Enable to run test(window build)
...
use static png, jpg library
2021-10-28 15:33:48 +09:00
JunsuChoi
f28a0d9b5c
test Scene/Canvas: Fix maximum size for big size test
...
In some development environments, -1 of uint32_t may become 0.
2021-10-28 14:24:20 +09:00
Hermet Park
70840218d6
tools svg2tvg: support converting multiple files.
...
Usage:
svg2tvg [SVG file] or [SVG folder]
Examples:
$ svg2tvg input.svg
$ svg2tvg svgfolder
2021-10-28 13:59:49 +09:00
JunsuChoi
5fd60e14a2
test Picture : Remove unnecessary namespace
...
Remove `std::`
2021-10-28 13:59:24 +09:00
JunsuChoi
a7f7cbd29a
test Picture: Change file open of ifstream to binary(and readonly) type
...
When opening a file using ifstream, a different problem occurs for each platform.
To fix this, change to binary, readonly type.
refer to:
https://stackoverflow.com/questions/9817806/why-does-my-program-produce-different-results-on-windows-and-linux-about-file-r
2021-10-28 13:59:24 +09:00
Hermet Park
370b9b08ec
sw_engine shape: code refactoring.
...
move the exceptional code for the coherency,
and ++ more history of the description.
2021-10-28 13:53:49 +09:00
Hermet Park
caf4d846fc
Update README.md
2021-10-27 20:58:45 +09:00
Hermet Park
3ba33382d7
tools svg2tvg: improve the usability.
...
Removed the .svg in the output name.
Before: tiger.svg -> tiger.svg.tvg
After: tiger.svg -> tiger.tvg
2021-10-27 20:56:48 +09:00
Hermet Park
a4494919ac
jpg_loader: support multi-thread and header reading in prior to decoding.
...
revise the code to support async loading of the static jpeg_loader,
also support header reading in prior to decoding.
2021-10-27 16:39:43 +09:00
Mira Grudzinska
babb10b7f3
sw_engine: rasterization region edited in the case of fast tracking
...
Since no antialiasing is applied for the fastTracking cases,
the shape's rasterization region needs to be edited. To establish
the rastered bbox, the rounding is performed before the bbox corners
are casted to the SwCoords.
2021-10-27 12:42:27 +09:00
Hermet Park
07d4db0555
jpg_loader: code refactoring
...
revise code to satisfy with the tvg world.
no logical changes.
- modified file names
- added the samsung copyright
- removed unnecessary typedefs
- ++indentation
- --LOC
2021-10-26 21:16:02 +09:00
Mira Grudzinska
2780d77a52
capi: tvg_paint_transform -> tvg_paint_set_transform
2021-10-26 19:20:15 +09:00
Mira Grudzinska
0dab343ba1
example: gradtransf.svg
...
The file enables to check the correctness of the gradient transformations
and units.
Removed duplicate file.
2021-10-26 10:47:18 +02:00
Hermet Park
f8a16cf022
Update CONTRIBUTING.md
2021-10-26 15:52:24 +09:00
Michal Maciola
003f53376e
jpg loader: support static jpeg loader using richgel999
...
Adds an alternative static jpg loader.
The jpg loader copied the jpeg decoding implementation from this open-source
repo: https://github.com/richgel999/jpeg-compressor
That opensource has the public-domain license, it doesn't have any restriction
of the copy.
note: jpgd.cpp is modified version (changed decompress_jpeg_image_from_stream)
for returning BGRA
2021-10-26 15:50:01 +09:00
Mira Grudzinska
8c52f2a870
capi: casting on 'const Paint*' instead of constness removing
2021-10-26 11:51:35 +09:00
Mira Grudzinska
6b7aff560f
example: modify the tvg example to plot all of the files
2021-10-26 10:14:23 +09:00
Hermet Park
5be27a151e
capi: ++missing const in capis.
...
Non-changeable apis should keep the const parameter so that
user knows the api won't change the internal data.
Thanksfully, we didn't release the capis, we can change it.
2021-10-25 22:21:09 +09:00
Mira Grudzinska
1006cbd0d8
tests: added Capis gradient transformation tests
2021-10-25 19:35:00 +09:00
Mira Grudzinska
d25a285b4c
capi: gradient transformation apis added
2021-10-25 19:35:00 +09:00
Mira Grudzinska
8cfe4ef708
sw_engine: including gradient transformation into gradient preparation
...
The gradient transformation has to be taken into account as the last
step of the gradient preparation.
2021-10-25 19:31:38 +09:00
Mira Grudzinska
7b778cd878
sw_engine: proper linear gradient transformation
...
In the case of any shape transformation, the gradient fill
was not correct.
2021-10-25 19:31:38 +09:00
JunsuChoi
664e95859c
svg_loader SvgLoader: Fix gradient default value
...
If isXXPercentage is true, then it is calculated accordingly.
2021-10-25 11:14:03 +02:00
JunsuChoi
0e57f869bc
example: Modify the number of svg image examples
...
Find the hidden example...
2021-10-25 16:18:15 +09:00
Mira Grudzinska
5fc5fd7f2d
svg_loader: requested changes applied
2021-10-25 11:15:58 +09:00
Mira Grudzinska
60029327f0
svg_loader: gradient handling and recalculation changed
...
The need to convert the gradient values occurs only when they are given
as nominal values in the current user coordinate system (userSpaceOnUse).
2021-10-25 11:15:58 +09:00
Mira Grudzinska
280d27ac83
capi: added pointer validation
2021-10-23 12:18:23 +09:00
Hermet Park
f24409a76d
doc: updated api doc.
...
use @retval for the multiple return values.
2021-10-23 11:52:10 +09:00
Mira Grudzinska
a93b5b98a9
svg loader: converting the image path to the absolute one
...
The href image tag should point to an absolute image path.
2021-10-23 02:26:55 +02:00
Hermet Park
6f3ff2a355
wasm: update the code.
...
Yes, now we have standard apis for getting class types,
don't need to hack it anymore.
Now, replaced the redundant id() calls with identifier()
2021-10-22 23:23:09 +09:00
Hermet Park
47334800c6
common: code refactoring
...
renamed internal module name IteratorModule -> IteratorAccessor
2021-10-22 23:20:29 +09:00
Mira Grudzinska
cc9b5669e5
tests: fill transformation tests added
2021-10-22 19:47:29 +09:00
Hermet Park
999c01ede8
api: not allow the inheritance of the Saver.
...
We missed the final keyword for the Saver,
This inheritance is out of our policy.
It might be break apis but Saver class is just opened,
and we're pretty sure that there is no any extension of this.
I know this is the bad decision, but we have a chance yet,
so we must correct it before further late.
2021-10-22 19:15:05 +09:00
Hermet Park
36270f588e
common: replace the id() -> identifier()
2021-10-22 18:47:05 +09:00
Hermet Park
8cc7f50235
test: API coverage up
...
Added identifier() test cases.
2021-10-22 18:47:05 +09:00
Hermet Park
78d85d714a
common: Introduce class type identifier apis.
...
This identifier is useful when user identify the instance type in runtime.
ThorVG basically don't prefer to dynamic_cast() nor typeid(),
it compiles with -fno-rtti option for the optimial size.
Here is an example for the simple usage.
if (paint->identifier() == Shape::identifier())
auto shape = static_cast<Shape*>(paint);
@Issue: https://github.com/Samsung/thorvg/issues/693
2021-10-22 18:47:05 +09:00
신지예
8a7ec66cb2
common: Fix typo
2021-10-22 18:26:25 +09:00
JunsuChoi
d3ba000d80
png_loader meson: Remove dependency check using find_library()
...
meson's find_library() throws an error when the package cannot be found.
png static library is added, so it should be passed when package is not found.
Therefore, delete unnecessary find_library.
2021-10-22 16:32:57 +09:00
Ji2z
fcb0258b3c
common: Fix typo
...
Fix typo backeneds to backends
2021-10-22 15:10:02 +09:00
Hermet Park
add46d1b92
updated README.md
2021-10-22 12:33:07 +09:00
Hermet Park
bee93ec4eb
Update README.md
2021-10-22 12:15:42 +09:00