Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lottie: implement skew transformation #2281

Merged
merged 1 commit into from
May 16, 2024
Merged

Conversation

mgrudzinska
Copy link
Collaborator

Added support for skew transformation by
a specified angle around a specified axis.

after:
Zrzut ekranu 2024-05-15 o 01 31 25

expected:
Zrzut ekranu 2024-05-15 o 01 36 56

skewed_stars.json

@mgrudzinska mgrudzinska added enhancement Improve features lottie Lottie animation labels May 14, 2024
@mgrudzinska mgrudzinska self-assigned this May 14, 2024
@mgrudzinska mgrudzinska requested a review from hermet as a code owner May 14, 2024 23:38
@hermet hermet requested a review from tinyjin May 15, 2024 06:05
Added support for skew transformation by
a specified angle around a specified axis.
Applied to layers and shapes, not to repeaters.

@issue: thorvg#2262
@@ -154,6 +190,16 @@ static bool _updateTransform(LottieTransform* transform, float frameNo, bool aut
_rotateX(&matrix, transform->rotationEx->x(frameNo, exps));
}

auto skewAngle = transform->skewAngle(frameNo, exps);
if (fabsf(skewAngle) > 0.01f) {
Copy link
Member

@hermet hermet May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the exceptions are handled in 198, Please consider the most general case.

if (skewAngle != 0.0f) 

is better obviously.

@hermet hermet merged commit dc6ddd8 into thorvg:main May 16, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve features lottie Lottie animation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants