Is there a way to create vector files programmatically? The pany I'm working for has to deliver vector assets to our clients (which are originally designed in flash, then the elements positions,scale and other details are stores in the database), and we want to eliminate the need for a human to actually create the vector graphic.
Is there a way to create vector files programmatically? The pany I'm working for has to deliver vector assets to our clients (which are originally designed in flash, then the elements positions,scale and other details are stores in the database), and we want to eliminate the need for a human to actually create the vector graphic.
Share Improve this question edited Sep 30, 2017 at 18:22 Cœur 38.8k25 gold badges206 silver badges279 bronze badges asked Sep 6, 2011 at 16:15 WalkerWalker 135k29 gold badges69 silver badges97 bronze badges 03 Answers
Reset to default 3Take a look at SVG. It's XML-based, so tweaking positions and colors is just a matter of tweaking the pos=
attribute of an XML element.
There aren't any SVG libraries for PHP that I am aware of, but creating a SVG image is just like creating an XML document, so using SimpleXML
or a similar library should suffice.
Here's an example script that performs serverside SVG creation: http://www.carto/svg/samples/serverside_svg_php.shtml
SVG is an open XML vector format you can easily create with any XML library. Have a look at the SVG Primer.
An alternative to SVG: if your client specifically wanted files in Flash format, Flash also have an .xfl format - http://www.leebrimelow./?p=1986 - which is essentially an unpressed fla.
It promises a folder with a number of easily created sub folders, where all shapes/movieclips etc are xml based.
Provided they have CS5 (I have CS5, not sure if it's available below that) or above, they'll be able to open it no problem.
Create a new fla and save it as .xfl to see the layout.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745643621a4637837.html
评论列表(0条)