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
Jinny You
c30019e6dd
capi: support loading external image feature for lottie
...
Updated API:
- Tvg_Result tvg_picture_load_data(Tvg_Paint* paint, const char *data, uint32_t size, const char *mimetype, bool copy, const string& resourcePath)
2023-11-22 18:04:35 +09:00
Sergii Liebodkin
548962f5f8
apis/engines: Revise the clear() buffer behavior.
...
ThorVG has offered an option to clear the buffer since version 1.0.
This is essential when users utilize the canvas target buffer
with the main render target. They share the buffer
and need to draw contents onto the existing contents.
API:
Result Canvas::clear(bool free = true)
-> Result Canvas::clear(bool paints = true, bool buffer = true)
Tvg_Result tvg_canvas_clear(Tvg_Canvas* canvas, bool free);
-> Tvg_Result tvg_canvas_clear(Tvg_Canvas* canvas, bool paints, bool buffer);
Issue: https://github.com/thorvg/thorvg/issues/1779
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
2023-11-20 18:23:00 +09:00
Hermet Park
2082343463
doc: make it up missing parameter information.
2023-11-09 14:46:14 +09:00
Hermet Park
d1bae0b44c
capi: udpated the doc.
...
BETA_API -> Experimental API
2023-11-08 10:53:39 +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
Hermet Park
0687b09c72
doc: keep the style clean & neat
2023-11-03 23:54:58 +09:00
Jinny You
a60c881b60
docs: Remove all warnings from doxygen
2023-11-03 12:05:21 +09:00
Hermet Park
d879e56856
saver: Revised the API for the 1.0 release
...
replaced the 'compress' option with 'quality'
API changes:
Result Saver::save(std::unique_ptr<Paint> paint, const std::string& path, bool compress) ->
Result Saver::save(std::unique_ptr<Paint> paint, const std::string& path, uint32_t quality = 100)
TVG_API Tvg_Result tvg_saver_save(Tvg_Saver* saver, Tvg_Paint* paint, const char* path, bool compress) ->
Tvg_Result tvg_saver_save(Tvg_Saver* saver, Tvg_Paint* paint, const char* path, uint32_t quality)
Issue: #1372
2023-11-02 11:58:23 +09:00
Mira Grudzinska
25a1321243
common: stroke dash offset support with new apis.
...
This change just allows users to use the offset of the stroke dash.
Actually feature enhacement has been introduced by
478e45f9f3
.
@APIs:
uint32_t Shape::strokeDash(const float** dashPattern) ->
uint32_t Shape::strokeDash(const float** dashPattern, float* offset = nullptr)
Result Shape::strokeDash(const float* dashPattern, uint32_t cnt) ->
Result Shape::strokeDash(const float* dashPattern, uint32_t cnt, float offset = 0.0f)
Tvg_Result tvg_shape_set_stroke_dash(Tvg_Paint* paint, const float* dashPattern, uint32_t cnt) ->
Tvg_Result tvg_shape_set_stroke_dash(Tvg_Paint* paint, const float* dashPattern, uint32_t cnt, float offset)
Tvg_Result tvg_shape_get_stroke_dash(const Tvg_Paint* paint, const float** dashPattern, uint32_t* cnt) ->
Tvg_Result tvg_shape_get_stroke_dash(const Tvg_Paint* paint, const float** dashPattern, uint32_t* cnt, float* offset)
@Issue: https://github.com/thorvg/thorvg/issues/1372
2023-10-30 11:47:51 +09:00
Hermet Park
e570064eba
animation/lottie: updated the frame count unit.
...
replace the frame count unit from the int32_t to float
since animations could smoothly interpolate key-frames.
This notificably improve the animation smoothness in Lottie
Beta API changes:
Result Animation::frame(uint32_t no) -> Result Animation::frame(float no)
uint32_t Animation::curFrame() const -> float Animation::curFrame() const
uint32_t Animation::totalFrame() const -> float Animation::totalFrame() const
2023-10-24 11:49:57 +09:00
Sergii Liebodkin
ce2a3f6040
capi: introduce missing blend functions in capi bindings
2023-10-18 10:39:45 +09:00
Hermet Park
2b7c47f2b5
doc/capi: updated
2023-09-26 19:06:57 +09:00
Hermet Park
ac82234360
capi: api sync up.
...
added beta apis:
- enum Tvg_Composite_Method::TVG_COMPOSITE_METHOD_INVERSE_LUMA_MASK;
promote apis:
- TVG_API Tvg_Result tvg_shape_set_stroke_miterlimit(Tvg_Paint* paint, float miterlimit);
- TVG_API Tvg_Result tvg_shape_get_stroke_miterlimit(const Tvg_Paint* paint, float* miterlimit);
@Issue: https://github.com/thorvg/thorvg/issues/1669
2023-09-25 21:33:23 +09:00
Hermet Park
749523b709
capi/animation: support animation features under the beta.
...
New APIs:
- Tvg_Animation* tvg_animation_new();
- Tvg_Result tvg_animation_set_frame(Tvg_Animation* animation, uint32_t no);
- Tvg_Paint* tvg_animation_get_picture(Tvg_Animation* animation);
- Tvg_Result tvg_animation_get_cur_frame(Tvg_Animation* animation, uint32_t* no);
- Tvg_Result tvg_animation_get_total_frame(Tvg_Animation* animation, uint32_t* cnt);
- Tvg_Result tvg_animatoon_get_duration(Tvg_Animation* animation, float* duration);
- Tvg_Result tvg_animation_del(Tvg_Animation* animation);
2023-09-25 12:27:22 +09:00
Hermet Park
7d797ee548
Yet we don't break apis, this patch reverts the next:
...
cb36c25aff
8c0fc2b25a
c1e4e0808a
Those reverted changes sholud be in the bucket, the next issue item:
@Issue: https://github.com/thorvg/thorvg/issues/1372
2023-08-24 01:00:57 +09:00
Mira Grudzinska
8c0fc2b25a
capi: dashed stroke setter and getter modyfied
...
tvg_shape_set_stroke_dash() and tvg_shape_get_stroke_dash()
require an extra argument: offset
2023-08-23 12:40:27 +09:00
Martin Capitanio
44a750ee5d
API, CAPI, sw_engine: add suport for stroke-miterlimit.
2023-06-13 10:42:20 +09:00
Hermet Park
07dc68f655
capi: --redundant tag
2023-06-12 11:29:29 +09:00
Hermet Park
b214fd23bc
common canvas/scene: introduce paints() api that returns the list of the paints.
...
These new apis would enable users to easily modify the motion scene,
The data structure of the paints has been changed from an array to a list.
@APIs:
std::list<Paint*>& Canvas::paints() noexcept;
std::list<Paint*>& Scene::paints() noexcept;
@Deprecated:
Result Canvas::reserve(uint32_t size) noexcept;
Result Scene::reserve(uint32_t size) noexcept;
@Issue: https://github.com/thorvg/thorvg/issues/1203
2023-06-09 10:54:03 +09:00
Mira Grudzinska
2309a48369
capi: tvg_shape_set_paint_order introduced
...
Capi sets the rendering order of the stroke and the fill.
2023-05-20 13:23:47 +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
Vincent Torri
be2de28312
portability: fix usage of TVG_API
...
Rule of thumb on Windows:
* for a DLL:
* if the library is built, set TVG_API to __declspec(dllexport)
* if the library is used, set TVG_API to __declspec(dllimport)
* for a static library, set TVG_API to nothing
To set TVG_API for a static library, TVG_STATIC is defined when the stataic library is built.
Otherwise, TVG_API is correctly set for a DLL.
Also sun and intel compilers are handled
@issue: https://github.com/thorvg/thorvg/issues/1446
2023-05-16 18:55:33 +09:00
Mira Grudzinska
ac86c522f1
capi: luma mask introduced, tvg_picture_load_raw description changed
2023-05-09 15:55:22 +09:00
Mira Grudzinska
cc75928c23
capi: type identifier apis added
...
The tvg_gradient_get_identifier and tvg_paint_get_identifier
apis have been introduced. They set the newly introduced
Tvg_Identifier enum, which indicates the paint and gradient
types, respectively.
2023-04-25 09:15:28 +09:00
Hermet Park
69063d2405
infra: specify TVG_API for both static/dynamic linking.
...
The previous meson script was incomplete,
therefore this change requires it to be revised.
To enable static linking use the next meson option.
"-Ddefault_library=static"
Issue: https://github.com/thorvg/thorvg/issues/1234
2023-04-22 18:32:22 +09:00
Mira Grudzinska
5b3252ecf9
capi: missing arg description added
2021-12-17 11:21:08 +09:00
Hermet Park
e2dd889e1a
apis: promote beta apis to the official ones.
...
these apis are good to open in the next release.
2021-11-11 14:17:43 +09:00
Mira Grudzinska
2780d77a52
capi: tvg_paint_transform -> tvg_paint_set_transform
2021-10-26 19:20:15 +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
d25a285b4c
capi: gradient transformation apis added
2021-10-25 19:35:00 +09:00
Mira Grudzinska
280d27ac83
capi: added pointer validation
2021-10-23 12:18:23 +09:00
Ji2z
fcb0258b3c
common: Fix typo
...
Fix typo backeneds to backends
2021-10-22 15:10:02 +09:00
Mira Grudzinska
95430fc645
capi: change defines to enum
...
Tvg_Engine enum introduced to replace TVG_ENGINE_SW/GL defs.
2021-10-14 12:39:54 +09:00
Mira Grudzinska
e6debdbf15
capi: tvg_swcanvas_set_mempool capi added ( #903 )
...
* capi: tvg_swcanvas_set_mempool capi added
* tests: tvg_swcanvas_set_mempool added to the tests
2021-10-13 19:31:39 +09:00
Mira Grudzinska
600055dacd
capi: saver capis added
2021-10-13 18:58:18 +09:00
Mira Grudzinska
d40d2ea288
capi: introduced Tvg_Colorspace enum instead of defs
...
Used in the tvg_swcanvas_set_target() capi.
2021-10-13 18:55:17 +09:00
Mira Grudzinska
e0488f4a8d
capi: tvg_gradient_duplicate() added
2021-10-13 18:34:02 +09:00
Mira Grudzinska
39af185de8
docs: ++
2021-10-12 14:04:18 +02:00
Hermet Park
9737dd4a89
test capi: update tvg_paint_get_bounds() utc.
...
The api has been changed by 060564cc93
update it according its change.
2021-10-06 22:17:18 +09:00
Hermet Park
ca9a9c3a42
capi: replaced bounds() api with the latest.
...
The next api of c++ version has been deprecated
Tvg_Result tvg_paint_get_bounds(const Tvg_Paint* paint, float* x, float* y, float* w, float* h);
instead, we introduce the next one under the beta.
Tvg_Result tvg_paint_get_bounds(const Tvg_Paint* paint, float* x, float* y, float* w, float* h, bool transformed);
2021-10-06 22:17:18 +09:00
Mira Grudzinska
dc55070ba7
docs: c and c++ apis docs improved
2021-10-06 22:11:17 +09:00
Mira Grudzinska
fc29d888f1
docs: ++ docs of the load apis
2021-10-05 14:16:41 +02:00
Mira Grudzinska
5b7f94a527
capi: picture size apis added
2021-10-05 16:03:10 +09:00
Mira Grudzinska
72727ea322
capi: removed repeated comments
2021-10-03 15:12:46 +02:00
Mira Grudzinska
9ad9c3e3f4
docs: improving c++ and c apis docs
2021-10-01 15:10:40 +09:00
Michal Szczecinski
91c1b99e2f
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.
2021-10-01 14:59:12 +09:00
Mira Grudzinska
b31961e517
capi: added the composite getter
2021-10-01 14:57:49 +09:00
Projectitis
591ea1d61c
Changes to support MSVC
2021-09-29 22:56:52 +09:00
Hermet Park
a4ccf4d812
common picture: recover viewbox() api.
...
though picture has size() api, we have a regression issue in tizen,
we can't remove this api until we resolve any regression conditions.
2021-08-09 12:39:21 +09:00