Hermet Park
65916857e2
api: polish the thorvg API usages
...
Use ColorSpace to support various types of raw bitmaps.
API Modifications:
- Result Picture::load(uint32_t* data, uint32_t w, uint32_t h, bool premultiplied, bool copy = false) -> Result Picture::load(uint32_t* data, uint32_t w, uint32_t h, ColorSpace cs, bool copy = false)
- Tvg_Result tvg_picture_load_raw(Tvg_Paint* paint, uint32_t *data, uint32_t w, uint32_t h, bool premultiplied, bool copy) -> Tvg_Result tvg_picture_load_raw(Tvg_Paint* paint, uint32_t *data, uint32_t w, uint32_t h, Tvg_Colorspace cs, bool copy)
issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-13 11:15:57 +09:00
Hermet Park
0e45fabb3d
spec out tvg binary format
...
issue: https://github.com/thorvg/thorvg/issues/2721
2024-10-12 21:07:31 +09:00
Hermet Park
889d1d1fa2
API: revise the APIs.
...
deprecate the `identifier()` APIs by replacing them with `type()`.
ThorVG is going to introduce an instance `id()`,
and this could be confused with the `identifier()` methods.
with this new type() method can reduce the memory size
by removing unncessary type data.
New Experimental C APIs:
- enum Tvg_Type
- Tvg_Result tvg_paint_get_type(const Tvg_Paint* paint, Tvg_Type* type)
- Tvg_Result tvg_gradient_get_type(const Tvg_Gradient* grad, Tvg_Type* type)
New Experimental C++ APIs:
- Type Paint::type() const
- Type Fill::type() const
- Type LinearGradient::type() const
- Type RadialGradient::type() const
- Type Shape::type() const
- Type Scene::type() const
- Type Picture::type() const
- Type Text::type() const
Deprecated C APIs:
- enum Tvg_Identifier
- Tvg_Result tvg_paint_get_identifier(const Tvg_Paint* paint, Tvg_Identifier* identifier)
- Tvg_Result tvg_gradient_get_identifier(const Tvg_Gradient* grad, Tvg_Identifier* identifier)
Deprecated C++ APIs:
- enum class Type
- uint32_t Paint::identifier() const
- uint32_t Fill::identifier() const
- static uint32_t Picture::identifier()
- static uint32_t Scene::identifier()
- static uint32_t Shape::identifier()
- static uint32_t LinearGradient:identifier()
- static uint32_T RadialGradient::identfier()
Removed Experimental APIs:
- static uint32_t Text::identifier()
issue: https://github.com/thorvg/thorvg/issues/1372
2024-07-05 21:25:58 +09:00
Jinny You
2c6c8d3b21
updated copyright date ( #1866 )
2023-12-28 10:43:25 +09:00
Hermet Park
f2c29063d2
api: updated the recent changed api again.
...
Reordered by the data packing size.
Also removed a wrong capi default parameter value.
Result Picture::load(const char* data, uint32_t size, const std::string& mimeType, bool copy = false, const std::string& rpath = "")
-> Result load(const char* data, uint32_t size, const std::string& mimeType, const std::string& rpath = "", bool copy = false)
Tvg_Result tvg_picture_load_data(Tvg_Paint* paint, const char *data, uint32_t size, const char *mimetype, bool copy, const char* resourcePath)
-> Tvg_Result tvg_picture_load_data(Tvg_Paint* paint, const char *data, uint32_t size, const char *mimetype, const char* resourcePath, bool copy);
2023-11-23 11:59:38 +09:00
Sergii
4da90b2847
picture: added ability to support premultiplied for picture raw loader
...
[issues 1479: picture raw loader to support premultiplied](https://github.com/thorvg/thorvg/issues/1764 )
api changes:
Result Picture::load(uint32_t* data, uint32_t w, uint32_t h, bool copy);
Result Picture::load(uint32_t* data, uint32_t w, uint32_t h, bool premultiplied, bool copy);
capi changes
TVG_API Tvg_Result tvg_picture_load_raw(Tvg_Paint* paint, uint32_t *data, uint32_t w, uint32_t h, bool copy);
TVG_API Tvg_Result tvg_picture_load_raw(Tvg_Paint* paint, uint32_t *data, uint32_t w, uint32_t h, bool premultiplied, bool copy);
2023-11-08 10:46:23 +09:00
JunsuChoi
595cc56e86
webp_loader: Introduce Webp image loader
...
Add external_webp loader which uses libwebp library.
2023-06-09 10:58:01 +09:00
Hermet Park
5ceeb32ef0
api: remove a beta api.
...
- Result Picture::viewbox(float* x, float* y, float* w, float* h) const; //c++
- vg_Result tvg_picture_get_viewbox(const Tvg_Paint* paint, float* x, float* y, float* w, float* h); //c
@Issue: https://github.com/thorvg/thorvg/issues/1372
2023-05-20 13:22:52 +09:00
Mira Grudzinska
51a31e226d
tests: capi identifier tests added
2023-05-04 09:58:09 +09:00
Hermet Park
d359d65640
test capi: ++coverage
...
added jpg, tvg tests
2023-04-06 19:54:54 +09:00
Hermet Park
f0ae3e9cee
test: fix broken plugin support.
...
The thorvg test should not attempt to perform features
that were not enabled, as this will cause them to fail.
@Issues: https://github.com/thorvg/thorvg/issues/1251
2023-04-06 19:47:10 +09:00
Hermet Park
9b3c34c3b1
updated copyright.
2023-01-14 13:48:11 +09:00
Hermet Park
f0141e63de
updated copyright date.
2022-01-12 14:08:48 +09:00
Mira Grudzinska
304a351dcc
tests: added tests for size and composite C apis
2021-10-07 15:03:28 +09:00
bchrescionko
a50ccbb0c6
test: added test for tvg_picture_get_viewbox function
2021-09-24 21:08:59 +09:00
Michal Maciola
cff8815404
loaders: Pass mimetype to picture::load
...
* loaders: Pass mimetype to picture::load
Added mimetype attribute to enfaster loading using a proper loader.
@Changed api: Picture::load(const char* data, uint32_t size, const std::string& mimeType, bool copy = false)
@issue: #571
2021-08-05 11:02:26 +09:00
Hermet Park
5e52134e2a
dexample Picture: improve the test coverage.
...
In this patch, it replaced the test images with Lenna.
and fix the wrong jpeg file size figuring.
2021-07-30 12:09:59 +09:00
Hermet Park
f7f241cff5
common picture: remove viewbox() api.
...
picture provides size() interface to return the image size,
viewbox() is conceptually not correct with the Picture.
Remove it under the beta api.
2021-07-28 13:07:43 +09:00
Hermet Park
94eeb92dbe
infra: seprate test image resources from the examples.
...
change for removing dependency.
2021-07-19 14:43:26 +09:00
Hermet Park
009c475fc9
test capi: add Picture unit test
2021-07-03 15:34:43 +09:00