+
Skip to content

Conversation

mgrudzinska
Copy link
Collaborator

So far, there hasn't been a case where this support was necessary, but it will be once chaining is added- when the LottieRoundnessModifier::modifyPath() is called by a previous modifier.

So far, there hasn't been a case where this support
was necessary, but it will be once chaining is added-
when the LottieRoundnessModifier::modifyPath() is
called by a previous modifier.
@mgrudzinska mgrudzinska self-assigned this Jun 18, 2025
@mgrudzinska mgrudzinska added enhancement Improve features lottie Lottie animation labels Jun 18, 2025
@hermet hermet requested a review from Copilot June 19, 2025 02:05
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for handling LineTo commands when applying round corner modifications in Lottie animations, paving the way for future chaining functionality.

  • Added conditionals to process LineTo commands by invoking the round corner logic.
  • Updated the main switch to include new branches for LineTo command handling with different index arithmetic.
Comments suppressed due to low confidence (1)

src/loaders/lottie/tvgLottieModifier.cpp:234

  • [nitpick] It would be beneficial to add inline documentation explaining how _colinear and the subsequent index arithmetic ensure the correct points are used for rounding, as the offset differences could be confusing at first glance.
                    if (inCmds[iCmds + 1] == PathCommand::CubicTo && _colinear(inPts + iPts)) {

Comment on lines 209 to +214
iPts += 3;
break;
} else if (inCmds[iCmds + 1] == PathCommand::Close) {
}
if (inCmds[iCmds + 1] == PathCommand::LineTo) {
_roundCorner(path.cmds, path.pts, prev, curr, inPts[iPts + 3], r);
iPts += 3;
Copy link

Copilot AI Jun 19, 2025

Choose a reason for hiding this comment

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

[nitpick] The index offset used here (iPts + 3) differs from the one used in the LineTo case (iPts + 1). Consider adding comments to document the rationale behind these differing offsets to improve maintainability.

Copilot uses AI. Check for mistakes.

@hermet
Copy link
Member

hermet commented Jun 20, 2025

@mgrudzinska do we have any test sample?

@hermet hermet force-pushed the main branch 3 times, most recently from 9b6c8bc to a6ffb7a Compare June 23, 2025 07:12
@mgrudzinska
Copy link
Collaborator Author

@mgrudzinska do we have any test sample?

as described here, for now not possible to test. only together with modifiers chaining

@hermet hermet force-pushed the main branch 5 times, most recently from 7ceb794 to 43923a5 Compare June 25, 2025 15:59
@hermet hermet force-pushed the main branch 4 times, most recently from 9ddde24 to dac61de Compare August 5, 2025 04:06
@hermet hermet self-requested a review as a code owner August 26, 2025 08:22
@hermet hermet force-pushed the main branch 5 times, most recently from c140740 to 4cd3567 Compare September 3, 2025 11:36
@hermet hermet force-pushed the main branch 4 times, most recently from 30c82d7 to 0c3e8ff Compare September 3, 2025 17:59
@hermet hermet force-pushed the main branch 2 times, most recently from 7b0fe6f to 811aac3 Compare September 22, 2025 16:00
@hermet hermet force-pushed the main branch 5 times, most recently from d471af2 to 0aaa738 Compare October 13, 2025 13:18
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.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载