admin管理员组文章数量:1435208
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.
本文标签: phpCreating vector files programmaticallyStack Overflow
版权声明:本文标题:php - Creating vector files programmatically? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745643620a2668002.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论