Hermet Park
76fb3f3cd9
api: clean up
...
promoted offical c++ apis (v0.15)
- enum class BlendMethod
- enum class CanvasEngine::Wg
- virtual Result Canvas::viewport(int32_t x, int32_t y, int32_t w, int32_t h);
- class Text
- Result Text::fill(uint8_t r, uint8_t g, uint8_t b)
- Result Text::fill(std::unique_ptr<Fill> f)
- static Result Text::unload(const std::string& path)
- static Result Text::load(const std::string& path)
- static Result Text::load(const char* name, const char* data, uint32_t size, const std::string& mimeType = "ttf", bool copy = false)
- static std::unique_ptr<Text> Text::gen()
- class WgCanvas
- static std::unique_ptr<WgCanvas> WgCanvas::gen()
- static const char* Initializer::version(uint32_t* major, uint32_t* minor, uint32_t* micro)
- class LottieAnimation
promoted official c apis (v0.15)
- Tvg_Blend_Method
- Tvg_Result tvg_engine_version(uint32_t* major, uint32_t* minor, uint32_t* micro, const char** version)
- Tvg_Result tvg_canvas_set_viewport(Tvg_Canvas* canvas, int32_t x, int32_t y, int32_t w, int32_t h)
- Tvg_Result tvg_paint_set_blend_method(Tvg_Paint* paint, Tvg_Blend_Method method)
- Tvg_Paint* tvg_text_new(void)
- Tvg_Result tvg_text_set_fill_color(Tvg_Paint* paint, uint8_t r, uint8_t g, uint8_t b)
- Tvg_Result tvg_text_set_gradient(Tvg_Paint* paint, Tvg_Gradient* gradient)
- Tvg_Result tvg_font_load(const char* path)
- Tvg_Result tvg_font_load_data(const char* name, const char* data, uint32_t size, const char *mimetype, bool copy)
- Tvg_Result tvg_font_unload(const char* path)
- Tvg_Animation* tvg_lottie_animation_new(void)
removed experimental apis
- BlendMethod paint::blend() const
- bool Shape::strokeTrim(float* begin, float* end) const
- Tvg_Result tvg_paint_get_blend_method(const Tvg_Paint* paint, Tvg_Blend_Method* method)
- Tvg_Result tvg_shape_get_stroke_trim(Tvg_Paint* paint, float* begin, float* end, bool* simultaneous)
- tvg_text_set_linear_gradient(Paint* paint, Tvg_Gradient* gradient)
- tvg_text_set_radial_gradient(Paint* paint, Tvg_Gradient* gradient)
issue: https://github.com/thorvg/thorvg/issues/1372
2024-09-23 21:53:50 +09:00
Mira Grudzinska
f79558eb62
API: deprecate the appendArc() api
...
@Issue: https://github.com/thorvg/thorvg/issues/2632
2024-08-16 13:30:58 +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
Hermet Park
0cd256f99c
test: resolve compiler warnings on msvc.
...
warning C4305: 'argument': truncation from 'double' to 'float'
2024-06-07 23:56:30 +09:00
Hermet Park
ade5eb2e8d
api: corrected return type.
...
NonSupport indicates unsupported options due to disabled features
or lack of system support. InvalidArgument indicates the case
such as incorrect parameter values.
2024-06-05 23:03:05 +09:00
Mira Grudzinska
669b5badf4
test: add strokeTrim tests
2024-06-05 11:55:36 +09:00
Jinny You
2c6c8d3b21
updated copyright date ( #1866 )
2023-12-28 10:43:25 +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
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
Mira Grudzinska
ca0f30c4c0
tests: capi test for tvg_shape_set_paint_order
2023-05-20 13:23:47 +09:00
Mira Grudzinska
51a31e226d
tests: capi identifier tests added
2023-05-04 09:58:09 +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
Michal Maciola
58ad09a07a
test capi: added missing canvas, paint and shape tests
...
Added tests for tvg_canvas_reserve, tvg_canvas_update_paint, tvg_paint_duplicate, tvg_paint_set_composite_method, tvg_shape_cubic_to, tvg_shape_close
2021-07-16 00:34:54 +09:00
Hermet Park
c19aa9fed7
tset capi: code refactoring.
...
revise coding style.
2021-06-16 12:53:26 +09:00
Hermet Park
fe493a93f2
test capi: fix build infrastructure
2021-06-16 12:22:08 +09:00