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

RadialGradient. Stop Offset > 1 (IOS) #303

Closed
MarkThielen opened this issue Apr 9, 2018 · 1 comment
Closed

RadialGradient. Stop Offset > 1 (IOS) #303

MarkThielen opened this issue Apr 9, 2018 · 1 comment
Milestone

Comments

@MarkThielen
Copy link

Hi there,

First of all, great work ! Love Macaw ;)

I understand that you are not supposed to pass Stop Offsets > 1.0 but if you do it makes the app crash hard.

Example:
let green_radial_gradient_fill = RadialGradient( stops: [ Stop(offset:0, color: Color(val: 0x39b54a)), Stop(offset:0.45, color: Color(val: 0x39b54a)),Stop(**offset:1.1**, color: Color(val: 0x000000))])

Not sure what the best way would be to handle this, but it would be helpful to see a warning in logs or something rather than a hard exit.

Cheers,
Mark

@ystrot
Copy link
Member

ystrot commented Apr 9, 2018

Hi Mark,

Thank you! I think the best way to handle invalid offsets is just ignore them, i.e. use 1 for all values >1 and 0 for all values <0. We'll plan such a fix for the next release.

@ystrot ystrot closed this as completed in 90c6e61 Apr 23, 2018
ystrot added a commit that referenced this issue Apr 23, 2018
Fix #303: RadialGradient. Stop Offset > 1 (IOS)
@f3dm76 f3dm76 added this to the 0.9.2 milestone Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants