简体   繁体   中英

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.

ex. here are the images:

一种d花

and user enter the radis of 100px in the textfield and submit, then the result will be:

最后结果

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)

Take a look at this previous StackOverflow question: Align objects to curve with canvas

It links to a JavaScript library for help with the math .

There's 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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