Mira Grudzinska
f94e419d2d
example: include mask extension in personal_character.json
2024-10-18 18:04:31 +09:00
Hermet Park
0a16152d75
api: renamed the composite with mask.
...
Since we've separated ClipPath and Masking,
Masking now has a distinct and independent purpose.
API Modification:
- enum class CompositeMethod -> enum class MaskMethod
- Result Paint::composite(std::unique_ptr<Paint> target, CompositeMethod method) -> Result Paint::mask(std::unique_ptr<Paint> target, MaskMethod method)
- CompositeMethod Paint::mask(const Paint** target) const -> MaskMethod Paint::mask(const Paint** target) const
issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-16 14:41:26 +09:00
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
9bc900206b
api: polish the thorvg API usages.
...
API Modification:
- SwCanvas::Colorspace -> ColorSpace
API Addition:
- ColorSpace::Unknown
issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-12 15:38:03 +09:00
Hermet Park
eb1208414d
example: unify Shape & MultiShapes
2024-10-11 17:16:59 +09:00
JunsuChoi
6cfc22d123
svg_loader: Support id attribute for tvg::Accessor
...
Supports access with tvg::Accessor using the value set in the id attribute of SVG
Please refer to examples/Accessor.cpp
2024-10-09 00:04:41 +09:00
Hermet Park
0da15d2e76
examples/lottie: updated resources
2024-10-08 11:46:53 +09:00
Hermet Park
145195baac
infra: removed beta tag from WebGPU
...
Removed beta tag for dev convenience. Also, ensures that
ThorVG will officially release WebGPU in the next version (v1.0)
2024-10-07 21:08:52 +09:00
Hermet Park
a72ed0ddfa
wg_engine: fixed resource leaks
...
issue: https://github.com/thorvg/thorvg/issues/2808
2024-10-04 14:20:51 +09:00
Mira Grudzinska
a80beff714
examples: fix mingw build error
...
M_PI was not declared error solved
2024-10-03 16:39:18 +09:00
Hermet Park
ad6f2070fe
examples/tvg: updated samples
2024-10-01 12:17:32 +09:00
Hermet Park
4bb0a369e5
examples: fixed an incorrect buffer size.
...
adjusted the size according to the offsets.
2024-09-30 17:09:21 +09:00
Hermet Park
ba7761c105
examples: added SceneEffect
...
added a showcase with a gaussian blur effect
2024-09-29 15:04:22 +09:00
RuiwenTang
64df0791df
example: MultiCanvas show case with GL backend
...
Change the MultiCanvas code to show how to render the content of
GlCanvas to a given off-screen framebuffer.
issue: https://github.com/thorvg/thorvg/issues/2746
2024-09-29 11:57:27 +09:00
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
Hermet Park
03dbb7a8e1
examples: updated a lottie sample
2024-09-19 15:30:40 +09:00
Hermet Park
ece1537271
examples: replaced ClipPath with clip()
2024-09-19 14:46:05 +09:00
Hermet Park
ae6faf56c5
lottie/expressions: ++coverage
...
Allow direct key[0]/key[1] access for key.value in expression
issue: https://github.com/thorvg/thorvg/issues/2722
2024-09-17 21:13:59 +09:00
Hermet Park
0e06413749
Revert "examples: updated samples"
...
This reverts commit 1e72e8f3a3
.
2024-09-15 15:24:36 +09:00
Hermet Park
1e72e8f3a3
examples: updated samples
2024-09-15 00:19:33 +09:00
Hermet Park
c562d63487
examples: updated lottie resources
2024-09-13 11:03:41 +09:00
Hermet Park
a746e1fcd6
renderer: blending refactoring++
...
- reordered the blending types to align with lottie spec.
- removed source over.
2024-09-09 21:18:13 +09:00
Sergii Liebodkin
e2e4fc6964
wg_engine: external device handles (web integration)
...
move instance, adapter and device creation from renderer to application
its necessary for web integration, because browser have its own mechanics to create hardware handles
this changes makes webgpu canvas more universal to use in case of system and web applications
issue: https://github.com/thorvg/thorvg/issues/2410
2024-09-06 13:08:58 +09:00
Hermet Park
d807ac91ea
examples: ++svg samples
2024-09-05 23:52:22 +09:00
Hermet Park
ac384332fe
examples: added image rotation
2024-08-22 13:01:53 +09:00
Mira Grudzinska
022f9fc897
examples: capi example ++
...
Animation is loaded from a memory instead from a file.
2024-08-20 18:46:29 +09:00
Hermet Park
5332876fe8
common: spec out TexMap
...
Spec out this incomplete experimental feature,
this is a still promising one, we will reintroduce
this officially after 1.0 release
size: -2kb
issue: https://github.com/thorvg/thorvg/issues/1372
2024-08-20 11:14:54 +09:00
Elliott Sales de Andrade
5f08b9ade4
build: Remove redundant comparisons
...
If a Meson option is typed as `boolean`, the `get_option` returns a
boolean, and comparing it with `true` is redundant. Meson also errors if
you try to compare across types, so it couldn't _not_ be a boolean.
Also, Meson is not C, so no need for parentheses around `if` conditions.
2024-08-19 17:42:40 +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
407fc84796
common: spec out Scene Clipper
...
Scene Clipper is an unusual feature
that is too unstable and ambiguous in ThorVG.
Users can achieve the same functionality
with multiple composed shapes instead of scene clipping.
size: -2.5kb
issues:
- https://github.com/thorvg/thorvg/issues/1548
- https://github.com/thorvg/thorvg/issues/1549
- https://github.com/thorvg/thorvg/issues/1573
2024-08-13 10:21:54 +09:00
Hermet Park
92303e91b4
examples: added Interaction sample
...
The Interaction sample demonstrates
how to handle user input with ThorVG Animation.
2024-08-07 12:02:22 +09:00
Hermet Park
d62b913455
renderer/accessor: revise set() api for animation support
...
before:
unique_ptr<Picture> Accessor::set(unique_ptr<Picture> picture, function<bool(const Paint* paint)> func)
after:
Result Accessor::set(const Picture* picture, std::function<bool(const Paint* paint, void* data)> func, void* data)
2024-08-07 12:02:22 +09:00
Hermet Park
8e91711358
examples: added Lighten/Darken options in MaskingMethods
2024-08-07 11:04:38 +09:00
Hermet Park
adbf7d3a2f
examples/lottie: updated a resource.
...
polished up for the animation smoothness.
2024-08-06 16:45:39 +09:00
Hermet Park
c257994d5c
lottie/expressions: feature enhancement
...
added groupIndex() support
added property (ix) value support
2024-07-31 18:26:42 +09:00
Hermet Park
de72161087
example: merge Path & PathCopy
2024-07-21 15:05:07 +09:00
Hermet Park
db889e1835
renderer: quick skip rendering if the opacity is zero
...
This also resolves a corner case bug introduced by
lottie render pooling: f06127ab93
2024-07-21 15:05:07 +09:00
Hermet Park
803dcb3fb9
lottie/expressions: ++coverage enhancement
...
Allow to access layer index globally.
2024-07-19 23:01:29 +09:00
Hermet Park
65fe1cb465
examples: updated lottie samples
2024-07-19 15:19:36 +09:00
Hermet Park
9e7d8b37ff
examples: added more expressions samples
2024-07-18 22:14:05 +09:00
Hermet Park
16cb1020ac
lottie/expressions: added a missing polystar property build.
2024-07-18 20:46:06 +09:00
Hermet Park
350f7a4357
examples: ++exception handling
...
Added handling for engine initialization failure.
2024-07-14 12:04:31 +09:00
Hermet Park
b915455e89
examples: added LottieExpressions
2024-07-12 18:57:10 +09:00
Hermet Park
ad2b6f6d51
examples: updated lottie samples
2024-07-12 00:39:31 +09:00
Hermet Park
a69a5c300f
examples: added svg samples
2024-07-11 23:31:07 +09:00
Hermet Park
61b68fab5b
example: print non support webgpu msg properly.
2024-07-09 11:26:18 +09:00
Hermet Park
329ab9ef4a
example: ++ DirectUpdate to cover more scenarios.
2024-07-08 11:39:28 +09:00
Hermet Park
300ced90c1
example: improved to print proper fail msgs.
2024-07-08 11:39:28 +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