GenerallyHelpfulSoftware / SVGgh

A framework for using SVG artwork in iOS Apps. Includes a UIView and a button class, printing and PDF export.
MIT License
141 stars 37 forks source link

React Native and SVGgh cocoapods version #11

Closed aksonov closed 9 years ago

aksonov commented 9 years ago

Great software! Works much better than SVGKit and PocketSVG. I've used this great library for React Native wrapper: https://github.com/aksonov/react-native-svg-elements

The goal was to avoid any XML parsing and use SVG elements directly as ReactNative elements. But I had to copy SVGgh sources into my project because SVGAttributedObject and other classes are not visible outside.

grhowes commented 9 years ago

Interesting. Of course, you are still parsing the path strings, but that should be fast compared to the actual Core Graphics calls.

aksonov commented 9 years ago

Yes. One problem i've met is static nature of SVGRenderer - it cannot be changed during run-time, i.e. i cannot add/remove SVG nodes,etc. I've made some 'hack' by introducing RCTSvgDynamicRenderer singleton which could be modified during React Native tree parsing.

grhowes commented 9 years ago

Yes, that's deliberate. I have another renderer I use for editing which is much more complicated.