简体   繁体   English

在给定半径的圆路径上定位图像(SVG或PHP)

[英]position Images on the circle path with the given radius (SVG or PHP)

I need to create an application which user enter radius of the curve or circle and choose the selected images (PNG Images with transparent background) will transform over the curve. 我需要创建一个应用程序,用户输入曲线或圆的半径并选择所选图像(具有透明背景的PNG图像)将在曲线上变换。

ex. 例如 here are the images: 这是图像:

一种d花

and user enter the radis of 100px in the textfield and submit, then the result will be: 并且用户在文本字段中输入100px的半径并提交,那么结果将是:

最后结果

the images position in the center of the curve or circle. 图像位于曲线或圆的中心。 any idea and sample code will be helpful,(in javascript and svg or in php) 任何想法和示例代码都会有所帮助(在javascript和svg或php中)

Take a look at this previous StackOverflow question: Align objects to curve with canvas 看一下之前的StackOverflow问题: 将对象与画布对齐以使其弯曲

It links to a JavaScript library for help with the math . 它链接到JavaScript库以帮助数学

There's jQuery Roundrr, http://www.addyosmani.com/resources/roundrr/ 有jQuery Roundrr, http://www.addyosmani.com/resources/roundrr/

You can build something that users can select the parameters (like radius, etc), select the images, order ... 您可以构建一些东西,使用户可以选择参数(例如半径等),选择图像,排序...
and than pass the data to the PHP and generate the final image. 然后将数据传递给PHP并生成最终图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM