SVG Icon Manipulation

Hi everybody,

I have seen a video in vimeo from Matt Petrowsky (https://player.vimeo.com/video/141731601) about using a new feature in Filemaker 14 to manipulate svg icons. I love Xojo, but I miss the visual options that I had in FileMaker. I would like to use in Xojo SVG icons like in Filemaker. Could anyone help me to get a similar manipulation?.

Thank you very much,
Sergio

Ditto, SVG would be great, especially for high resolution displays.

Yes, this is a good option for example in retina displays. I only want to use SVG code (xml text) to include it into a canvas and then modify its code to change the color, size, etc.

I wrote an SVG parser for Xojo, many years ago. It re-mapped to Xojo’s Object 2D. I’ll see if I can dig it out, it will need some work if someone is willing to put in the time.

No offense Sam, but I’d prefer an “official” library. Xojo’s Object2D isn’t a great system, I’d expect the results to be sub-par.

Technically I agree with you, we never used the code in an actual app because Object 2D would crash frequently when dealing with complex shapes. However I’m not sure what you’re expecting, even if Xojo add support for SVG, they’ll probably just map it to Object2D anyway, as that’ is Xojo’s 2D graphics library, unless they have a better one in the works.

We already had this conversation, Xojo needs an SVG Object, and once released, Object2D could be deprecated.

I’d basically expect to be able to turn an SVG into a bitmap of given specs.

In the feature request for implementing svg, there is a talk about a svdtoo2d parser, thanks to Dr Brian R Gaines.

10931 - Support for SVG import/export for vector graphics from January 4th, 2010 Dr Brian R Gaines on 22 août 2014 at 01:12

The classes are still available to downloads right now.

Hope that helps.

It is kind of surprising that Apple has preferred the kind of cumbersome collection of bitmaps over a vector based format to support their now 2x and 3x screens, if not pending more.

Are these icons really vector images or embedded bitmaps ?
(or a mix of the two ?)

[quote=224112:@Emile Schwarz]Are these icons really vector images or embedded bitmaps ?
(or a mix of the two ?)[/quote]

Apple icons are bitmaps. Hence the 1024 x 1024 icons needed for 2x, pending 2048 x 2048 when Mac goes 3x.

SVG is vector based : https://en.wikipedia.org/wiki/Scalable_Vector_Graphics which would make it a breathe to generate any size bitmap on the fly.

Except for PDF, Apple make it really easy to use PDF elements in your application and they even provide a wealth of functionality for editing PDF.

We’ve started to introduce PDF icons into our applications where possible. I threw one in the recent Retina Kit 3 demo app, just to show that it can be done. The button uses our upgrade icon which is a PDF.

SVG faces the chicken and egg situation, no one supports SVG, because no one supports SVG. If Apple would get on board, then others might. Then again, Apple adopted JPEG2000 pretty early on and used it for their icon files, meanwhile it still didn’t take off in the rest of the industry. JPEG2000 does better compression and supports alpha channels…

You do not understant my point neither with icons (text above) and Vector suff…

Fortunately, with Fonts, you know what is bitmap fonts (deprecated, fortunately) and vector fonts (TrueType).

Just what was the CD situation in 1983:

Harware manufacturer says: “There is so few CDs available…”
And Record companies: “there is so few hardware installed…”

And now, nearly 30 years after, the CD is been deprecated, slowly…

30 years on ? Wasn’t the 45RPM vinyl discs introduced around 1955 ?
1955 + 30 = 1985…

I should admit that understanding your point is often rather challenging :stuck_out_tongue:

For what its worth there is a feedback case ranked all the way to 14th place for vector graphics.
<https://xojo.com/issue/10931>

Some interesting observations with the demo SVG files I have on my machine. I can Quicklook them, some display error messages, they’re viewable in “Safari”. However they don’t open in Preview, and neither in the Retina Kit.

You can tap into the Quicklook engine and get a rasterized version via QLThumbnailGenearate (I think), however all of SVG files that I have seem to have rather large widths and heights full of blank space, so you’d need to dig into the SVG to figure the real width and then clip once you’ve rasterized. Which seems rather wasteful.

In regards to bloated ICNS files , have you tried ICNSmini? https://itunes.apple.com/gb/app/icnsmini-shrink-png-icns-iconsets/id1035260885?mt=12

…because I do not watch carefully the conversation (either the text and the subject line), so I give (sometimes) answers that are not in tune with the original question / the last addition. But I want to help.