SVG state

Hello,
I want to know the state of developpement of svg
Is it possible :

What is possible with SVG and which addons ?

Thanks a lot

You should check out the ofxSVG addon that ships with OF 0074
https://github.com/openframeworks/openFrameworks/tree/master/addons/ofxSvg

The example shows how to animate the drawing of the lines
https://github.com/openframeworks/openFrameworks/tree/master/examples/addons/svgExample

If you want to check if a mouse click is inside a polyline, try
https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/graphics/ofPolyline.h#L102-L104

Rather than make a whole new thread, I’m wondering what SVG format people have the most success with. SVG 1.0, 1.1, SVG Tiny 1.1, SVG Tiny 1.1+…I can’t find info about it which probably means it’s right in front of my face

I’m getting consistent crashes on load using a couple files I’ve made and it points to svgtiny.cpp as the culprit when it tries to release a point that isn’t there:

svgExampleDebug(1994,0xa00ef540) malloc: *** error for object 0x141c73c: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

This is just with the example and trying to load a new file. Strange thing is that in 10.6 it’ll load and run and just keep spitting out that error in console, while in 10.8 the app won’t launch and it’ll just show that malloc error once

It’s one particular point that keeps throwing the error, so im going to see if it can just skip the problematic one, or I’ll just delete it from the svg file. This is using SVG 1.1 exported from illustrator.

EDIT:

Here are some lines from the SVG I’m trying to output:

  
		<line display="inline" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" stroke-linejoin="bevel" x1="799.572" y1="1126.702" x2="812.788" y2="1101.75"/>  
	  
		<line display="inline" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" stroke-linejoin="bevel" x1="812.788" y1="1101.75" x2="835.221" y2="1084.839"/>  
	<polygon display="inline" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" stroke-linejoin="bevel" points="  
		839.822,993.001 839.611,994.73 826.913,999.304 852.672,1018.049 854.33,1016.843 	"/> //chokes on these lines  
	  
		<line display="inline" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" stroke-linejoin="bevel" x1="800.682" y1="1079.28" x2="812.788" y2="1101.75"/>  

Hi, that’s actually a bug that’s been fixed in github now. As the developer of that addon let me me just say oops!

Unfortunately the links don’t work anymore. Do you have any other resources? :slight_smile: