elm-community / typed-svg

Typed SVG library written for Elm
BSD 3-Clause "New" or "Revised" License
59 stars 16 forks source link

elm-community#26 Added gradients and patterns #38

Closed Anton-4 closed 4 years ago

Anton-4 commented 4 years ago

I needed gradients so I implemented them based on the discussion in #26. I am open to suggestions for changes, I thought the fastest way to move things along would be to start with a full implementation that can be changed as you see fit.

Because Stroke and Fill use identical arguments in the svg spec, so I replaced those types with Paint. This also means code will not be backwards compatible.

The current examples with exception for the animation were not working for me, I got a ReferenceError: _Platform_export is not defined., possibly because I am using Elm 0.19.1 . I fixed the old examples and added new ones for multiple types of gradients and a pattern.

rupertlssmith commented 4 years ago

Nice, I think your idea to merge Fill and stroke is a good one.

Merged in. Do you think you might have any other API breaking changes coming soon? Reason I ask is to decide if I should wait for those before publishing a new version, and get a few breaking changes into the new version. Or just go ahead and publish now if you don't have anything planned.

Anton-4 commented 4 years ago

Thanks for reviewing! I have no additional breaking changes planned.