Mira Grudzinska [Tue, 5 Oct 2021 10:04:40 +0000 (12:04 +0200)]
svg_loader: proper handling width/height units (#851)
Units of the svg width and height tags were incorrectly assigned.
Percentage values will be handled separately.
Mira Grudzinska [Mon, 4 Oct 2021 19:40:23 +0000 (21:40 +0200)]
capi: picture size apis added
Mira Grudzinska [Mon, 4 Oct 2021 08:03:48 +0000 (10:03 +0200)]
docs: minor changes (#868)
Mira Grudzinska [Sun, 3 Oct 2021 13:08:46 +0000 (15:08 +0200)]
capi: removed repeated comments
projectitis [Sat, 2 Oct 2021 03:40:31 +0000 (16:40 +1300)]
Readme: Add links to documentation
Projectitis [Fri, 1 Oct 2021 23:38:09 +0000 (12:38 +1300)]
Portable fallthrough attribute
Mira Grudzinska [Wed, 29 Sep 2021 23:50:50 +0000 (01:50 +0200)]
capi: tvg_canvas_destroy should be able to destroy SwCanvas and GlCanvasa as well
Mira Grudzinska [Fri, 1 Oct 2021 06:10:40 +0000 (08:10 +0200)]
docs: improving c++ and c apis docs
Michal Szczecinski [Wed, 29 Sep 2021 08:04:36 +0000 (10:04 +0200)]
capi: Release official CAPI's.
Changes:
- Removed beta api tag from CAPI module
- For some APIs, the tag has not been changed due to main API status
- Moved some documentation changes to have similar descriptions in main
API and CAPI
- Removed deprecation warnings.
Mira Grudzinska [Thu, 30 Sep 2021 21:53:35 +0000 (23:53 +0200)]
capi: added the composite getter
Hermet Park [Fri, 1 Oct 2021 05:53:56 +0000 (14:53 +0900)]
common: code refactoring.
--loc, no logical changes.
Michal Maciola [Tue, 28 Sep 2021 11:15:24 +0000 (13:15 +0200)]
common: allow composition on empty scene without insufficient condition error
If there was an empty scene (empty scene, so bounds equal zero) with a mask composition applied,
Paint::Impl::render failed on checking size and Canvas::draw() returned InsufficientCondition.
As a result no other paints was rendered.
@issue: fixes #842
Projectitis [Wed, 29 Sep 2021 02:08:43 +0000 (15:08 +1300)]
Changes to support MSVC
Projectitis [Wed, 29 Sep 2021 04:29:17 +0000 (17:29 +1300)]
Update readme with optional dependencies
JunsuChoi [Wed, 29 Sep 2021 13:53:09 +0000 (22:53 +0900)]
README: Add license badge
Mira Grudzinska [Tue, 28 Sep 2021 10:03:04 +0000 (12:03 +0200)]
svg_loader: fixing minor warnings
Hermet Park [Fri, 1 Oct 2021 03:05:34 +0000 (12:05 +0900)]
bump up version v0.5.1
Change-Id: Ia0800ca5f93d77b37e65ae46fde8fc60f9b73063
JunsuChoi [Fri, 1 Oct 2021 00:55:05 +0000 (09:55 +0900)]
[Tizen] Enable png, jpg loader
NUI's Picture class has been added, so png and jpg loaders are required.
Change-Id: I46d23d45665325ecc6093639b52745d95eacc2b4
Hermet Park [Mon, 27 Sep 2021 02:28:40 +0000 (11:28 +0900)]
bump up version v0.5.0
Change-Id: If9b1a1615f0add93edeea1dbf0dda791cbf05018
bchrescionko [Fri, 24 Sep 2021 13:19:02 +0000 (15:19 +0200)]
test: creating test for downscaling picture (#837)
Added tests for the functions rastering scaled down images
Change-Id: Ib63690ae5bf4c35022ee5d2cc75b91fcd3324df7
bchrescionko [Fri, 24 Sep 2021 12:08:59 +0000 (14:08 +0200)]
test: added test for tvg_picture_get_viewbox function
Hermet Park [Fri, 24 Sep 2021 12:07:34 +0000 (21:07 +0900)]
Update CONTRIBUTING.md
Hermet Park [Fri, 24 Sep 2021 06:25:18 +0000 (15:25 +0900)]
Update README.md
Hermet Park [Fri, 24 Sep 2021 03:19:02 +0000 (12:19 +0900)]
infra: just released v0.5.0
Change-Id: Ie4dd6cf81cf2c0f4489348e66859df81a385c053
Hermet Park [Fri, 24 Sep 2021 03:11:47 +0000 (12:11 +0900)]
sw_engine: fix compiler a warning
handle them double type values.
Hermet Park [Fri, 24 Sep 2021 03:04:31 +0000 (12:04 +0900)]
tvg_saver: resolve sanitizer report.
"runtime error: load of misaligned address 0x7fb67895c815 for type 'unsigned int', which requires 4 byte alignment"
same to
c8cc973888e6d1148264f619c85fea93ca2f1b7c
Hermet Park [Fri, 24 Sep 2021 02:58:48 +0000 (11:58 +0900)]
tvg_saver: fix the memory leak.
Hermet Park [Fri, 24 Sep 2021 02:53:46 +0000 (11:53 +0900)]
tvg_loader: resolve sanitizer report.
"runtime error: load of misaligned address 0x7fb67895c815 for type 'unsigned int', which requires 4 byte alignment"
This is actually not an issue but we can resolve it with an easy workaround,
since we don't need to see this report repeatedly.
Hermet Park [Thu, 16 Sep 2021 13:03:17 +0000 (22:03 +0900)]
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
Hermet Park [Thu, 23 Sep 2021 06:17:48 +0000 (15:17 +0900)]
apis: release official apis.
tvg picture is going to be released, we need the Saver as well.
Also, two stable periperal apis are released in v0.5
@APIs:
Result Picture::load(const char* data, uint32_t size, const std::string& mimeType, bool copy = false) noexcept;
CompositeMethod Paint::composite(const Paint** target) const noexcept;
Result Saver::save(std::unique_ptr<Paint> paint, const std::string& path, bool compress = true) noexcept;
Result Saver::sync() noexcept;
static std::unique_ptr<Saver> Saver::gen() noexcept;
Hermet Park [Thu, 23 Sep 2021 07:50:08 +0000 (16:50 +0900)]
api: remove the redundant api, Picture::paint().
tvg::Picture is replaced to tvg::Scene if the picture has the vector tree,
Thus it's useless since it won't be reached logically.
JunsuChoi [Thu, 23 Sep 2021 05:39:58 +0000 (14:39 +0900)]
sw_engine Raster: Improving image quality in image scale down
An average value sampled based on adjacent pixels of the target pixel is used.
Michal Maciola [Wed, 22 Sep 2021 13:11:23 +0000 (15:11 +0200)]
wasm: enable png loader (#828)
Michal Maciola [Wed, 22 Sep 2021 13:08:14 +0000 (15:08 +0200)]
example image: added image image-embeded-png.svg (#827)
Mira Grudzinska [Mon, 20 Sep 2021 12:58:35 +0000 (14:58 +0200)]
sw_engine avx: removing not portable variable type
__m256i_u is an internal gcc/clang type, which can not be used by msvc.
To ensure the portability of the lib a proper intrinsic is used.
Mira Grudzinska [Mon, 20 Sep 2021 11:49:19 +0000 (13:49 +0200)]
common: change args type in the internal size() implementation
The API expected floats, whereas the called impl function expected
ints. The values were saved as floats, so the float->int->float conversion
is not needed.
Mira Grudzinska [Sun, 19 Sep 2021 17:34:36 +0000 (19:34 +0200)]
infra: excluding pthread lib dependency on windows os
Change-Id: Ifce46747305d89ca5e2329bc6d0309392f73f225
Mira Grudzinska [Tue, 21 Sep 2021 23:01:49 +0000 (01:01 +0200)]
example: refactoring
Change-Id: I0d695d1e4c3b33d769d5c89a41fc1ff6760ddb6f
Michal Maciola [Tue, 21 Sep 2021 14:47:20 +0000 (16:47 +0200)]
svg: fix url property
If 'fill="url(#image)"' and defs with id 'image' was not found, the paint was
improperly filled with color.
Change-Id: Ia1d0291f0877c81199181b4352e08a889816cc72
Mira Grudzinska [Mon, 20 Sep 2021 11:54:06 +0000 (13:54 +0200)]
common: preventing msvc compiler warnings (#817)
Change-Id: I493f57ee92f6394033b373ab91048e7dadd7455b
Mira Grudzinska [Sun, 19 Sep 2021 17:48:48 +0000 (19:48 +0200)]
common: preventing possible compiler warnings
Change-Id: I68a2c31347ab9ea3735bbd59d27be22211c4a2cc
JunsuChoi [Thu, 16 Sep 2021 08:27:45 +0000 (17:27 +0900)]
bump up version v0.4.5
Change-Id: I01805f967fff75c9d2051c95b38b8e9a7427f02a
Hermet Park [Thu, 16 Sep 2021 04:42:09 +0000 (13:42 +0900)]
prepare to release tvg format feature.
Change-Id: Ie0a9f66a1415dd8d4395e4b537f5b7c39821acb9
Hermet Park [Thu, 16 Sep 2021 05:50:33 +0000 (14:50 +0900)]
tvg_saver: code refactoring
removed the duplicated given child transform code,
no logical changes actually.
Change-Id: I70a097cae89150b074fa2e12b1c7175acaf27c89
Hermet Park [Thu, 16 Sep 2021 03:47:05 +0000 (12:47 +0900)]
examples: updated tvg resources.
Change-Id: Ie825b6002eb4a8b8884b00e57b4cdad85d53aab7
Mira Grudzinska [Sat, 11 Sep 2021 09:14:00 +0000 (11:14 +0200)]
tvg_saver: proper serialization of a grad fill
In the case when a gradinet fill is present, the transformation matrix
can't be preapplied.
Change-Id: I3346a351a488a7685443eae64c901f4cf185b005
Michal Szczecinski [Wed, 15 Sep 2021 13:17:25 +0000 (15:17 +0200)]
sw_engine: Fixed build errors.
Change-Id: Id48353d69550fe6e5ec39216d2ba1562f5a0bdc7
JunsuChoi [Thu, 16 Sep 2021 03:41:08 +0000 (12:41 +0900)]
[Tizen] Remove html files for docs
These are all generated files from DoxyWizard.
Change-Id: Id72ca009a991494b998ac90363271de3f6c2dfbf
Hermet Park [Wed, 15 Sep 2021 12:05:20 +0000 (21:05 +0900)]
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
Hermet Park [Wed, 15 Sep 2021 11:06:20 +0000 (20:06 +0900)]
examples: updated favorite tvg to fix position issue.
Hermet Park [Wed, 15 Sep 2021 10:40:59 +0000 (19:40 +0900)]
examples: updated tvg resources
these two resources were fixed by the positioning.
Hermet Park [Wed, 15 Sep 2021 10:16:44 +0000 (19:16 +0900)]
examples: updated tvg resources
Mira Grudzinska [Tue, 14 Sep 2021 23:43:45 +0000 (01:43 +0200)]
svg_loader: proper svg resizing
Solves the problem of 'vx' and 'vy' < 0 and cases with 'width'
and 'height' values different than widht and height from the 'viewBox'
attribute.
Michal Maciola [Tue, 14 Sep 2021 12:27:39 +0000 (14:27 +0200)]
wasm: paint opacity in the layers list (#804)
Hermet Park [Tue, 14 Sep 2021 10:52:44 +0000 (19:52 +0900)]
examples: updated tvg sample
Hermet Park [Mon, 13 Sep 2021 11:49:46 +0000 (20:49 +0900)]
examples: extends svg samples
Mira Grudzinska [Fri, 10 Sep 2021 15:00:38 +0000 (17:00 +0200)]
svg_saver: shifting 'preTransform' value changing
'preTransform = false' makes sense in case a stroke exist,
so not only when the stroke-width > 0 but when it's color
is valid as well.
Michal Maciola [Fri, 10 Sep 2021 11:31:20 +0000 (13:31 +0200)]
example images: added rotlines.svg (#796)
Michal Maciola [Fri, 10 Sep 2021 11:26:58 +0000 (13:26 +0200)]
wasm: improved bounds calculation (#795)
Improved bounds calculation in case a rotation is applied
Hermet Park [Thu, 9 Sep 2021 13:30:03 +0000 (22:30 +0900)]
Update README.md
Michal Maciola [Thu, 9 Sep 2021 08:45:58 +0000 (10:45 +0200)]
wasm: validate empty data (#790)
Michal Maciola [Thu, 9 Sep 2021 08:40:19 +0000 (10:40 +0200)]
wasm: remove default data (#789)
Hermet Park [Thu, 9 Sep 2021 05:18:46 +0000 (14:18 +0900)]
api: removed unused
Michal Maciola [Thu, 9 Sep 2021 04:06:13 +0000 (06:06 +0200)]
Wasm: allow iterator and add functions for layers revising (#730)
* common: move iterator functionality into separate IteratorModule
* wasm: allow internal lib dependencies and iterator
* wasm: added functions for layers revising
This patch adds functions to thorvgwasm.cpp:
layers() - that return a list of paints in a picture
bounds() - that returns a bounds of a given paint
setOpacity() - that sets the opacity of a given paint
Michal Maciola [Wed, 8 Sep 2021 15:05:10 +0000 (17:05 +0200)]
wasm: pass mimetype on loading and store original size
This patch adds the mimetype parameter for load() function and adds storing of
an original size after successful loading. Added function originalSize().
Hermet Park [Thu, 9 Sep 2021 02:57:07 +0000 (11:57 +0900)]
api: set default value nullptr for user convenience.
Michal Maciola [Wed, 8 Sep 2021 15:33:17 +0000 (17:33 +0200)]
wasm: add force parameter for update() function
Hermet Park [Wed, 8 Sep 2021 11:43:23 +0000 (20:43 +0900)]
sw_engine image: fix the clipped image issue.
there was a wrong condition introduced the bug that image was not updated,
because transformation is not re-applied after the first created the internal image data.
@Issues: https://github.com/Samsung/thorvg/issues/751
Hermet Park [Thu, 9 Sep 2021 02:05:54 +0000 (11:05 +0900)]
examples: updated a tvg resource.
Hermet Park [Thu, 9 Sep 2021 01:56:31 +0000 (10:56 +0900)]
bump up version v0.4.4
Change-Id: I405b3b9bd42e72233226df279fb2b1a410f61bde
Mira Grudzinska [Wed, 8 Sep 2021 07:47:57 +0000 (09:47 +0200)]
tvg_saver: fix the stroke width scaling factor
To get the scaling factor from the transformation matrix we have
to use two of its elements.
Hermet Park [Wed, 8 Sep 2021 04:20:50 +0000 (13:20 +0900)]
examples tvg: added a new example to verify tvg resources.
These tvg resources might be updated before official release.
Mira Grudzinska [Tue, 7 Sep 2021 11:12:08 +0000 (13:12 +0200)]
sw_engine: overlaping stroke cap
A square or a round cap was mistakenly added to the parts
of the dashed lines that should be continuous. Fixed
@Issues: https://github.com/Samsung/thorvg/issues/777
Hermet Park [Tue, 7 Sep 2021 09:54:42 +0000 (18:54 +0900)]
tvg_saver: fix a wrong logic by mistake.
an incorrect logic was introduced by mistake.
that breaks the tvg memory chunks.
now recover it.
@Issues: https://github.com/Samsung/thorvg/issues/774
Hermet Park [Tue, 7 Sep 2021 09:14:05 +0000 (18:14 +0900)]
tvg_loader: code refactoring.
no logical changes in the succesful cases,
change the code for better readibility.
and add log messages in the error scenario.
Hermet Park [Tue, 7 Sep 2021 05:34:04 +0000 (14:34 +0900)]
tvg_saver: fix the incorrect stroke transformation
Saver tries to pre-transfom to skip the matrix data,
but it missed the case - transformed stroking,
we skip it also only when xy scaling factors are same excluding the dash properties,
because scaled of the stroking is depent on the engines,
we have no idea of the proper input data in advance.
@Issues: https://github.com/Samsung/thorvg/issues/773
Mira Grudzinska [Mon, 6 Sep 2021 11:01:09 +0000 (13:01 +0200)]
svg_loader: parsing flags in the elliptical arc curve
Since the arc flags can have values 0 or 1, we reported as
an error cases, when a float value was given.
Since the EBNF grammar can be used, we misread some paths.
Removing the condition that prevents giving a float as a flag solves
this problem and is in agreement with the w3 specs.
Hermet Park [Mon, 6 Sep 2021 06:38:18 +0000 (15:38 +0900)]
tvg_saver: save the missing scene reserve count. (#771)
This reserved count was just missed,
Aside from it, tvg_loader logic is not well organized (hard to expect)
We can refine it by recovering the data tree structure in the reverse order.
@Issues: https://github.com/Samsung/thorvg/issues/768
Hermet Park [Mon, 6 Sep 2021 06:35:11 +0000 (15:35 +0900)]
tvg_loader: code refactoring & optimization loading. (#772)
Skip the reassigning values by the flags,
We assume those property values are reserved,
leave to apis that handle the invalids if the exceptions.
Mira Grudzinska [Thu, 2 Sep 2021 00:36:02 +0000 (02:36 +0200)]
sw_engine: handling clips from outside the render region
Clips from outside the rendering region were ignored resulting
in rendering shapes, which should be completely clipped.
In case of the clip fast track, the bounding box width/height
overflow occured and shape, that should be clipped, could be
visible (not always).
Hermet Park [Fri, 3 Sep 2021 02:07:30 +0000 (11:07 +0900)]
Revert "sw_engine avx: the not aligned memory separated in the rasterRGBA32 func"
This reverts commit
dafc229a757b71feb3f67c8bf4f8073f662d6964.
Mira Grudzinska [Thu, 26 Aug 2021 23:50:00 +0000 (01:50 +0200)]
sw_engine avx: the not aligned memory separated in the rasterRGBA32 func
The aligned and not aligned memory parts handled separately.
This gives around 10% of the performance increase (tested on i7-8700 CPU)
Michal Maciola [Thu, 2 Sep 2021 12:57:22 +0000 (14:57 +0200)]
utc: testing loading and saving .tvg
Added tests of loading and saving .tvg.
Created testSavers.cpp. Created files tag.tvg and test.tvg. Minor change
in tag.svg.
Mira Grudzinska [Thu, 2 Sep 2021 13:04:44 +0000 (15:04 +0200)]
test SwEngine: increasing lines coverage (#767)
All functions from tvgSwStroke.cpp called.
Mira Grudzinska [Tue, 31 Aug 2021 10:33:56 +0000 (12:33 +0200)]
test SwEngine: _rasterTranslucentRect added into the tests
Mira Grudzinska [Tue, 31 Aug 2021 12:40:58 +0000 (14:40 +0200)]
test SwEngine: raster image functions included into the unit tests
All image rastering funcions called in the 'Image Draw' test case.
Mira Grudzinska [Tue, 31 Aug 2021 13:07:57 +0000 (15:07 +0200)]
sw_engine: calling avxRasterTranslucentRect instead of its c version
For avx vector support the avxRasterTranslucentRect should be called
instead of cRasterTranslucentRect (mischanged in
01e1fec367e0ed7cf2bb052089b12e9c406f30d8).
Mira Grudzinska [Tue, 31 Aug 2021 13:15:03 +0000 (15:15 +0200)]
docs: minor linguistic changes (#759)
Michal Maciola [Tue, 31 Aug 2021 09:19:18 +0000 (11:19 +0200)]
svg2png: changed help message (#762)
Mira Grudzinska [Tue, 31 Aug 2021 09:14:16 +0000 (11:14 +0200)]
svg2png: fixing the args interpretation (#760)
The background color was misinterpreted and its value was treated
as an svg file name (warning was returned).
The color format can not be passed in a `#ffffff` format, since
the '#' sign is used in bash to comment a line and nothiing after
it is loaded.
Hermet Park [Mon, 30 Aug 2021 12:21:11 +0000 (21:21 +0900)]
tvg_loader: guarantee the buffer ends with the null character
the issue is detected by asan.
Mira Grudzinska [Mon, 30 Aug 2021 09:42:42 +0000 (11:42 +0200)]
sw_engine neon: refactoring
One if statement less.
Mira Grudzinska [Wed, 25 Aug 2021 08:49:51 +0000 (10:49 +0200)]
sw_engine neon: fix the iterations number of 'neon calls'
In the case, when the dst memory was not aligned,
we went out of the dst range in the 'neon loop'.
Michal Maciola [Mon, 30 Aug 2021 10:40:29 +0000 (12:40 +0200)]
README: updated svg2png section (#758)
Hermet Park [Mon, 30 Aug 2021 10:05:12 +0000 (19:05 +0900)]
Update README.md
Hermet Park [Mon, 30 Aug 2021 07:54:43 +0000 (16:54 +0900)]
sw_engine: code refactoring.
simplify neon code and fix the wrong range access.
Hermet Park [Mon, 30 Aug 2021 06:35:27 +0000 (15:35 +0900)]
tvg_loader: fixed a wrong delete call.
delete is not expected here, malloc-free must be paired.
Change-Id: I25ee480a238fa86d9cd01a3d5850031c9b443a89
Mira Grudzinska [Sun, 29 Aug 2021 22:36:59 +0000 (00:36 +0200)]
tvg saver: enabling gradient transformation
A gradient transformation was omitted when saving
into the tvg format. Fixed
Change-Id: Ifca25ef9608b3cab279e645f817b2829f0b972bb
JunsuChoi [Fri, 27 Aug 2021 05:14:36 +0000 (14:14 +0900)]
doc: Enhance appendPath docs
Added description according to api behavior change
Change-Id: I1abf748fa64d092e39199cbf99315586865e78a0
jykeon [Mon, 30 Aug 2021 05:54:54 +0000 (14:54 +0900)]
bump up version v0.4.3
Change-Id: Iaeecd0a7fcf617a00f1fc70e98e5914e0a9b300a
Signed-off-by: jykeon <jykeon@samsung.com>