GenerallyHelpfulSoftware / SVGgh

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

Please support the svg 1.1 specifications: svg images are not displayed correctly #4

Open Emasoft opened 9 years ago

Emasoft commented 9 years ago

This library would be very useful but please support the svg 1.1 specifications: all svg images I tried are not displayed correctly. In this incomplete state the library is not usable. Please finish the excellent work that you have started.

grhowes commented 9 years ago

Could you provide some images you'd like to view, and bitmaps of what they are supposed to look like?

Emasoft commented 9 years ago

This is how it should look: ios_app_buttons

You can download the original svg file from my google drive (click on the download button): http://goo.gl/m7TbmM

Emasoft commented 9 years ago

Have you tried to display the above svg file with SVGgh? Many things are rendered wrong or not displayed.

grhowes commented 9 years ago

I will try to get to it this weekend.

--glenn

On Jan 29, 2015, at 10:34 AM, Emasoft notifications@github.com wrote:

Have you tried to display the above svg file with SVGgh? Many things are rendered wrong or not displayed.

— Reply to this email directly or view it on GitHub.

grhowes commented 9 years ago

The file you sent makes extensive use of both filters and effects. It'd take a huge effort to incorporate those into the library (I've no clue as to how I'd implement filters in a performant way.) So, I doubt this will be happening anytime soon. Also, the heavily chromed theme your generating just does not fit in with how I use the library, so it wouldn't be of much use to me. Sorry.

Emasoft commented 9 years ago

Please reconsider. It would be very helpful for many developers to have the option to display real SVG images in iOS applications. For implementing filters you can take a look at the very complete Batik Svg java library: http://xmlgraphics.apache.org/batik/

Emasoft commented 9 years ago

For an easier debug, here it is a splitted version of the two main buttons svg files, you can download the zip from here: https://drive.google.com/file/d/0BxexooDWEb8ublZlcm5yRWpXTzQ/view?usp=sharing

Here are the screenshots of how each svg file should look:

schermata 2015-02-20 alle 20 28 22 schermata 2015-02-20 alle 20 27 56 schermata 2015-02-20 alle 20 24 58 schermata 2015-02-20 alle 20 24 49 schermata 2015-02-20 alle 20 24 17 schermata 2015-02-20 alle 20 23 59

grhowes commented 9 years ago

I've been thinking about this, and if I were to support special effects, I would likely have to render into an offscreen buffer and blit that buffer into the CGContextRef. I'm loathe to do that as PDF's would lose resolution independence and high resolution printing would go away.

I just don't want to do it.

I can improve gradients and maybe add the shadow effect, but I'm not inclined to support SVG special effects.

--glenn Sent from my iPhone

On Feb 20, 2015, at 2:39 PM, Emasoft notifications@github.com wrote:

For an easier debug, here it is a splitted version of the two main buttons svg files, you can download the zip from here: https://drive.google.com/file/d/0BxexooDWEb8ublZlcm5yRWpXTzQ/view?usp=sharing

Here are the screenshots of how each svg file should look:

— Reply to this email directly or view it on GitHub.

Emasoft commented 9 years ago

Take a look at the Chrome svg code, it can be useful to you: http://goo.gl/TB61nC