Commit graph

371 commits

Author SHA1 Message Date
faxe1008
6489e65064 common: Use explicit floating-point value types.
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
2025-01-16 18:34:12 +01:00
Jinny You
1ae817b634 lottie/slot: Support transform slot overriding
issue: https://github.com/thorvg/thorvg/issues/2591
2025-01-16 16:11:55 +01:00
Hermet Park
d00b727cd4 lottie: support stroke layer effect
issue: https://github.com/thorvg/thorvg/issues/2718
2025-01-02 14:52:36 +01:00
Hermet Park
e0588d39f0 lottie: Fixed a regression in masking logic
The scene tree should be arranged prior to appending the masking.
This was caused by 838785d75a
2025-01-02 14:49:43 +01:00
Mira Grudzinska
0fc2e6adcb portability: fix file size check on Windows
Resolved an issue where parsing failed due to mismatch
between file size obtained via `ftell` and the actual
bytes read by `fread`. This occurred because newline
translation (`\r\n` to `\n`) in text mode altered the byte
count, leading to incorrect assumptions about the data size.
2025-01-02 13:11:05 +01:00
Hermet Park
bed521a08c common: refactored the scene effect tint
Pre-convert the data type from float to uint8_t
2025-01-02 13:10:31 +01:00
Hermet Park
00324f5e19 lottie: revise the masking logic
- Allow the masking data even though they were mask None mode.
  Those will be used by the layer stroke effect.
- Fixed masking Offset to apply to all masking chains.
- Optimized fast track masking with resolving the opaicty condition.
- Clean up the overall code.
2024-12-20 00:38:19 +01:00
Hermet Park
2eed9f9024 lottie: ++exception handling
dropshadow opacity range seems 0 ~ 256.
make it sure in 0 ~ 255.
2024-12-20 00:38:19 +01:00
Hermet Park
64a5bd039d lottie: support Tritone LayerEffect
issue: https://github.com/thorvg/thorvg/issues/2718
2024-12-20 00:38:19 +01:00
Hermet Park
a69bad43fe lottie: support Tint LayerEffect
issue: https://github.com/thorvg/thorvg/issues/2718
2024-12-20 00:36:26 +01:00
Hermet Park
7b8ebcea10 lottie: support Layer Effect Fill type
During the fill properties, only color/opacity is available.
Not support other properties since they are unclear spec now.

issue: https://github.com/thorvg/thorvg/issues/2718
2024-12-19 16:18:44 +01:00
Mira Grudzinska
f3cc245b37 lottie: add TextCaps property support 2024-12-05 16:45:02 +01:00
Hermet Park
52cf31a79d renderer: make the file io configurable
certain systems, may not support file I/O operations.
ThorVG should provide users with an option to configure
builds according to their requirements.

This ensures that file I/O calls are avoided,
preventing potential crashes.

Please use the meson '-Dfile=true/false' option for this.

Please note that "THORVG_FILE_IO_SUPPORT" might be expected
for your thorvg manual build.

issue: https://github.com/thorvg/thorvg/issues/3008
2024-12-02 12:03:15 +09:00
Hermet Park
a233ae09da lottie: ++parser stability
fixed a parsing failure that occurred
when a desired single value was presented as part of an array.

issue: https://github.com/thorvg/thorvg/issues/2975
2024-11-27 19:17:23 +09:00
Hermet Park
4010496e8b lottie: compact code++
use constructor to remove unnecessary function call
2024-11-27 18:56:41 +09:00
Hermet Park
1fa30d9321 lottie: ++slot overriding
- fixed the ommiting the duplicate keyframe data overriding
- code refactoring

issue: https://github.com/thorvg/thorvg/issues/2988
2024-11-26 01:19:54 +09:00
Mira Grudzinska
96ffc05ecb lottie: fix bug in expressions
'end' used instead of 'offset'
2024-11-26 01:19:48 +09:00
Hermet Park
3d4df8df41 lottie: portability++
issue: https://github.com/lvgl/lvgl/issues/7214
2024-11-26 01:19:39 +09:00
Mira Grudzinska
b3c1c33285 lottie: shapes support in text range selector
@issue: #2178
2024-11-26 01:18:59 +09:00
Mira Grudzinska
483b40c78e lottie: easing support in text range selector
@issue: #2178
2024-11-26 01:18:53 +09:00
Hermet Park
e95f80c18f lottie: corrected drop-shadow handling
opacity value type should be float with range 0 ~ 256
2024-11-26 01:17:28 +09:00
Hermet Park
13aa26109f lottie: support drop shadow effect
issue: https://github.com/thorvg/thorvg/issues/2153
issue: https://github.com/thorvg/thorvg/issues/2718
2024-11-26 01:17:13 +09:00
Hermet Park
bf7b837b17 lottie: --minor memory leak 2024-11-19 01:13:51 +09:00
Hermet Park
1779689f03 lottie: Fixed a regression bug
Reverted commit db800c8d45,
which introduced another regression that omitted support
for multiple image asset references.

Updated the data of active images in the pooler
within the override() function to resolve the issue.
2024-11-19 01:01:34 +09:00
Hermet Park
ed07a151c9 lottie: ++slot overriding
Keep trying overriding even if the given sid is invalid.

issue: https://github.com/thorvg/thorvg/issues/2969
2024-11-18 23:43:18 +09:00
Mira Grudzinska
80815b269b infra: prevent warning on windows
"conversion from 'float' to 'int8_t', possible loss of data"
2024-11-18 23:43:12 +09:00
Jinny You
b394a46cef lottie/slot: Fix incorrect image slot schema
Issue: #2964
2024-11-18 23:42:55 +09:00
Hermet Park
a989dc9a7d lottie: fixed a memory leak
A regression bug by efe7440fa0

To address this, removed the non-essential image pooling mechanism.

issue: https://github.com/thorvg/thorvg/issues/2959
2024-11-18 23:42:04 +09:00
Hermet Park
88098f547f lottie: corrected an omission in overriding the default slot
issue: https://github.com/thorvg/thorvg/issues/2953
2024-11-18 23:40:37 +09:00
Jinny You
98fbc90f9b lottie/slot: Support image overriding 2024-11-18 23:39:28 +09:00
Mira Grudzinska
ce3bee7a3f lottie: fix text range opacity 2024-11-18 23:37:14 +09:00
Mira Grudzinska
d37ab3b39f lottie: maxAmount support in the text range selector
@issue: #2178
2024-11-18 23:35:40 +09:00
Mira Grudzinska
76206a174e lottie: smoothness support in the text range selector
@issue: #2178
2024-11-18 23:35:31 +09:00
Mira Grudzinska
606e107712 lottie: text range selector++
Change in the algorithm for selecting characters included
in the range selector. This is the first step towards adding
support for maxAmount, smoothness, and easing.

@Issue: https://github.com/thorvg/thorvg/issues/2178
2024-11-18 23:24:58 +09:00
Hermet Park
e66f6853d9 lottie: code clean up 2024-11-18 23:03:00 +09:00
Jinny You
ab1c62bd05 lottie/text: Support text alignment options
Introduced new properties:
- group alignment
- text grouping (words, line)

Issue: #2178
2024-11-18 23:02:56 +09:00
Hermet Park
e954297a64 lottie: improve slots to properly override solid fill opacity 2024-11-09 17:31:19 +09:00
Hermet Park
e12765ef41 lottie: support default slot overriding
issue: https://github.com/thorvg/thorvg/issues/2915
2024-11-09 17:31:16 +09:00
Hermet Park
f42559e613 lottie/slot: revise gradient fill support
Revise gradient fill data parsing by adding support
for the color stop count (p) parameter in slot data.

issue: https://github.com/thorvg/thorvg/issues/2795
2024-11-08 12:46:03 +09:00
Hermet Park
c830abb901 lottie: corrected a shallow keyframe data copy bug
The previous assignment operator was missed due to a template error,
which has now been corrected.

issue: https://github.com/thorvg/thorvg/issues/2797
2024-11-01 17:38:24 +09:00
Mira Grudzinska
16111bf55b lottie: fix text range selector translation
Scaling the entire scene caused unintended scaling
of the translation in the text range selector.
2024-11-01 17:37:57 +09:00
Mira Grudzinska
a851d1706e lottie: fix transformations in text range selector
Since the translate API was used while text updating,
the subsequent range selector transformations gets overwritten
when updating the shape (scale and rotate, adding another
translation will persist). This caused unexpected results.
Fixed by using the transform API when additional transformations
are needed - also fixes applying more than one range selector.
2024-11-01 17:37:44 +09:00
Mira Grudzinska
269e6c4d10 lottie: offset does not depend on shape direction
According to tests in AE, the offset direction should
not depend on the direction of the shape. A positive
offset value expands the shape, while a negative value
contracts it. Fixed.
2024-10-22 00:41:15 +09:00
Mira Grudzinska
9ce784751c lottie: correct the array reserved size
The color input will contain at least colorStops.count * 4
elements (not including alpha). Since the alpha offset values
don't have to much colorStops, estimation is used.
2024-10-22 00:41:01 +09:00
Mira Grudzinska
4c0765b761 lottie: fix offset
For long Bezier curves compared to the offset value,
the offsetting algorithm caused deformation. The problem
became evident after adding mask extension, as the simple
shapes defined there are based on Bezier curves rather
than as shapes like a circle/rect/etc, which is the case
for the offset. Now fixed.
2024-10-22 00:40:24 +09:00
Hermet Park
b5943d627f lottie: multiply opacity to the fill alpha value,
opacity of a shape may bring a composition
when it has both stroke and fill
2024-10-22 00:40:06 +09:00
Hermet Park
d0f18e741d lottie: release memory immediately after loading is complete.
there is no need to retain the data,
as the Lottie source is not reusable
and is affected by the parsing mechanism.

issue: https://github.com/thorvg/thorvg/issues/2647
2024-10-22 00:39:53 +09:00
Mira Grudzinska
661bdeb9b7 lottie: add support for mask expansion
Implemented the mask attribute 'x' - expand mask.
Enforced rounded lines join according to tests in AE.

@Issue: https://github.com/thorvg/thorvg/issues/2832
2024-10-22 00:39:21 +09:00
Hermet Park
43cdd4c7ec lottie: Fine-tune for post-processing effect.
reduce quality for the post-processing effect to
improve general performance, while fine-tuning the quality
for lower resolutions.
2024-10-22 00:39:06 +09:00
Hermet Park
066160a82a lottie: hotfix a crash
Fixed a mistake during the code merge.

issue: https://github.com/thorvg/thorvg/issues/2733
2024-10-12 12:41:15 +09:00