最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Creating vector files programmatically? - Stack Overflow

programmeradmin2浏览0评论

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 0
Add a ment  | 

3 Answers 3

Reset to default 3

Take 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.

发布评论

评论列表(0)

  1. 暂无评论