Commit graph

212 commits

Author SHA1 Message Date
Hermet Park
e2057d10f1 examples: updated svg.
revised the logic to align svg images in the center of the grids.

this is the subsequent changes to 3939b61770.
2022-09-02 12:10:36 +09:00
Hermet Park
5fa8aac2aa 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
2022-08-23 22:44:24 +09:00
Rémi Verschelde
46c3fc1f94 Format code files with dos2unix, ensure newline at EOF 2022-07-10 23:21:05 +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
Hermet Park
143cb83515 examples: adds a new sample svg 2022-02-14 14:38:39 +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
Hermet Park
cf5ce5d00c examples images: updated sample resources 2022-01-26 17:58:30 +09:00
Mira Grudzinska
74a99867df examples: terminate the same engine as was initialized 2022-01-21 23:55:17 +01:00
Hermet Park
f0141e63de updated copyright date. 2022-01-12 14:08:48 +09:00
Michal Maciola
a18f85cca8
example: added LumaMasking.cpp (#621)
Added an example LumaMasking.cpp that tests CompositeMethod::LumaMask
2021-12-30 15:56:25 +01:00
Hermet Park
906679cbeb infra: just changed naming. 2021-12-24 14:04:08 +09:00
Shinwoo Kim
d349f73222 example: add script to execute all
This patch will save your time to check example.

  ./all.sh [interval time between examples, default is 1 second]
2021-12-24 14:01:55 +09:00
Hermet Park
100d98d82e common: Introduced Accessor for traversing the scene-tree.
Basically, this Accessor is a utility to debug the Scene structure,
by traversing the scene-tree by users.

You can search specific nodes to read the property information,
figure out the structure of the scene tree and its size.

We actually don't recommend you to touch the property unless you really
know the each paint's position and role because it's not visible, difficult to
understand its anatomy.

Also, You must underatnd that modifying the nodes of the scene will be going
well with both the art-design structure and the prorgram logic.

In this first version, Accessor only supports for the Picture class.

@example:

auto picture = tvg::Picture::gen();
picture->load("test.svg");

//The callback function from lambda expression.
//This function will be called for every paint nodes of the tree.
auto f = [](const tvg::Paint* paint) -> bool
{
    if (paint->identifier() == Shape::identifier()) {
        //override properties?
        uint8_t r, g, b, a;
        paint->fillColor(&r, &g, &b, &a);
        paint->fill(r / 2, g / 2, b / 2, a);
    }

    //You can return false, to stop traversing immediately.
    return true;
};

auto accessor = tvg::Accessor::gen();

picture = accessor->access(move(picture), f);

...

@Issue: https://github.com/Samsung/thorvg/issues/693
2021-12-23 11:54:44 +09:00
Hermet Park
0aefbc3fb8 examples: update tvg binaries. 2021-12-22 18:48:49 +09:00
Hermet Park
e258a2a662 sw_engine texmap: implemented fast span-edge anti-aliasing
This Anti-Aliasing mechanism is originated from Hermet Park's idea.
To understand this AA logic, you can refer this page:
www.hermet.pe.kr/122 (hermetpark@gmail.com)

@Issue: https://github.com/Samsung/thorvg/issues/161
2021-12-16 15:56:20 +09:00
Hermet Park
36da47af80 png_loaders: fix the wrong premultiplying operations.
It should not modify the alpha channel value while premultiplying
that turned out with the wrong visual result.

@Issue: https://github.com/Samsung/thorvg/issues/655
2021-12-13 23:46:15 -08:00
Hermet Park
4cdf648e14 sw_engine image: support non-premultiplied alpha images.
Previously, translucent png images are not displayed properly
due to alpha channels premultiplication.

This patch implements that missing part to support it properly
by introducing the Surface data between canvas engine & rasterizer

@Issue: https://github.com/Samsung/thorvg/issues/655
2021-12-02 17:10:12 +09:00
Hermet Park
3221e27e3e examples: replaced png resource to verify alpha channel.
alpha blending looks a bit awkward.. need to fix it.
2021-11-23 16:16:09 +09:00
Hermet Park
49294e9142 examples: remove boundary samples.
Removed these tests from the example since it's not so proper showcases
for user scenaro.
2021-11-22 17:40:06 +09:00
Hermet Park
e83a47b4c6 example stress: adjusted loading count.
This example loads all the svgs even if they are out of the screen space.
2021-11-19 16:12:25 +09:00
Hermet Park
840e4f54f0 example stroke: updated the sample 2021-11-19 13:32:13 +09:00
Hermet Park
823cc85238 examples: added image scale up/down samples. 2021-11-18 17:45:49 +09:00
Hermet Park
7152953df4 example boundary2: added image boundary check sample. 2021-11-18 10:41:00 +09:00
Mira Grudzinska
6be38fa431 example: added different stroke's caps 2021-11-17 23:56:37 +09:00
Hermet Park
c510ced623 example stroke: added vertical line samples. 2021-11-17 23:01:49 +09:00
Hermet Park
41b4b30269 examples: remove low quality sample images. 2021-11-17 12:42:00 +09:00
Hermet Park
5690f1ab0d examples pictures: updated for case cover.
+ test opacity
2021-11-15 18:07:24 +09:00
Hermet Park
cffc87e7b1 sw_engine raster: code refactoring.
keep the code thorvg convention.
2021-11-10 17:03:07 +09:00
Hermet Park
c31c77c0fb tvg_loader interpreter: tiny optmization
skip memory copy as possible.
2021-11-02 19:47:08 +09:00
Hermet Park
3abf89a6ff examples: updated tvgs
re-compiled the tvgs with the latest tvg saver.
2021-11-02 14:32:29 +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
Mira Grudzinska
6b7aff560f example: modify the tvg example to plot all of the files 2021-10-26 10:14:23 +09: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
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
Mira Grudzinska
e6f8aa1379 capi: example modified 2021-10-19 10:27:37 +09:00
Michal Maciola
cba7cf0e2b
example: added image-embeded-jpeg.svg (#890) 2021-10-08 17:38:18 +02:00
Hermet Park
74954db56d common paint: refine the bounds() api to return the values after applying transformation.
Current paint::bounds() returns the coordinates under the raw status,
the values are not quite useful if the paint object has the transformed children.

Thus, we extends the feature and give an additional parameter "transformed"
to return the coordinates values after transformation by user demands.

This is also necessary for tvg format, since we need the exact view size of the scene information.

The previous api is deprecated and we introduce a new api to replace it.

@APIs:
+ Result Paint::bounds(float* x, float* y, float* w, float* h, bool transformed) const noexcept;
- Result Paint::bounds(float* x, float* y, float* w, float* h) const noexcept;

@Issues: https://github.com/Samsung/thorvg/issues/746
2021-09-24 11:25:49 +09:00
Michal Maciola
4c13246f9c
example image: added image image-embeded-png.svg (#827) 2021-09-22 15:08:14 +02:00
Mira Grudzinska
cfacdd705f example: refactoring 2021-09-22 01:13:52 +02:00
Hermet Park
80a940c70a examples: updated tvg resources. 2021-09-16 12:47:05 +09:00
Hermet Park
ee7dc1352e tvg_saver: do not merge if the shapes have outlines.
Merged shapes with outlines expects the layered,
unfortunately tvg can't cover the situation.

@Issues: https://github.com/Samsung/thorvg/issues/783
2021-09-16 00:06:01 +09:00
Hermet Park
e5f8bc99b7 examples: updated favorite tvg to fix position issue. 2021-09-15 20:06:20 +09:00
Hermet Park
c4e1a1f752 examples: updated tvg resources
these two resources were fixed by the positioning.
2021-09-15 19:41:11 +09:00
Hermet Park
4142237cac examples: updated tvg resources 2021-09-15 19:16:44 +09:00
Hermet Park
47c1aac562 examples: updated tvg sample 2021-09-14 19:53:12 +09:00
Hermet Park
e3266ac19c examples: extends svg samples 2021-09-13 20:49:46 +09:00
Michal Maciola
150cff0fd5
example images: added rotlines.svg (#796) 2021-09-10 13:31:20 +02:00