Skip to content

add .trim shape modifier#325

Merged
marcprux merged 4 commits intoskiptools:mainfrom
vincentborko:feature/shape-trim
Feb 12, 2026
Merged

add .trim shape modifier#325
marcprux merged 4 commits intoskiptools:mainfrom
vincentborko:feature/shape-trim

Conversation

@vincentborko
Copy link
Copy Markdown
Contributor

Thank you for contributing to the Skip project! Please use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device
  • REQUIRED: I have checked whether this change requires a corresponding update in the Skip Fuse UI repository (link related PR if applicable)
  • OPTIONAL: I have added an example of any UI changes in the Showcase sample app

- blur
- border width
- brightness
- contrast
- grayscale
- hueRotation
- saturation
@marcprux
Copy link
Copy Markdown
Member

marcprux commented Feb 6, 2026

The demo added in skiptools/skipapp-showcase-fuse#42 is showing the trim paths all reversed between the iOS and Android builds. Do you see this as well?

iOS Simulator Screenshot of trim path Android emulator Screenshot of trim path

@marcprux marcprux added enhancement New feature or request compose Limitation of Jetpack Compose or issue with SwiftUI translation labels Feb 6, 2026
@marcprux
Copy link
Copy Markdown
Member

Any thoughts on this, @vincentborko? I'd love to get this merged if we can fix the reversal issue…

@vincentborko
Copy link
Copy Markdown
Contributor Author

vincentborko commented Feb 12, 2026

Sorry, I didn't see the previous reply, I was very busy with another project of mine. I'll try to look into it ASAP to fix it latest on the weekend.

IIRC I might have implemented a custom trim especially for circles, with might be worth commenting out to try the generic approach.
Edit: Nvm, the issue is with all the shapes you showed in screenshot, not only circles

@vincentborko
Copy link
Copy Markdown
Contributor Author

vincentborko commented Feb 12, 2026

compose's addOval, addRect, addRoundRect use internally android.graphics.Path.Direction.CCW, while swiftUI creates path clockwise. apparently this didn't matter for anything besides the new trim and animations. we could either accept the difference as its "native" as I think, or manually update the path functions to overwrite them with clockwise drawing. do you want me to update it to match SwiftUI?

@marcprux
Copy link
Copy Markdown
Member

Yeah, I think the Compose needs to match the SwiftUI in this case. Is there some handy "invert trim path" method somewhere that could be used?

@vincentborko
Copy link
Copy Markdown
Contributor Author

ive updated it.
Screenshot 2026-02-12 at 18 02 51

@marcprux
Copy link
Copy Markdown
Member

Great! Glad it was so simple 😄

@vincentborko
Copy link
Copy Markdown
Contributor Author

sure thing.
if you want, I can merge the newanimationplayground into animationplayground

@marcprux
Copy link
Copy Markdown
Member

Yes please, that'd be great!

@marcprux marcprux merged commit d03de0e into skiptools:main Feb 12, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed compose Limitation of Jetpack Compose or issue with SwiftUI translation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants