问题
I want to warp text on HTML Canvas around Bezeir curves and Circles. CSSWarp library does that using CSS3 on DOM. I am looking for a library which does the same on HTML canvas. I googled in vain. Did anyone come across such a library? Or was anyone able to successfully warp text on HTML5 canvas around bezeir curves/circles?
回答1:
I don't really know if something similar has been done in HTML5, but there are a tons of experiments done in Flash. Yous should check this blog: http://algorithmist.wordpress.com/. It's completely dedicated to bazier spline exploration. Another great resource is this site: http://www.tinaja.com/cubic01.shtml with tons of examples and great articles related to the subject. Here is paper which explain the concept behind wrapping text to a bazier spline: http://www.tinaja.com/glib/nonlingr.pdf
And as a side note i can nominate two great and complex library which does the desired effect only on SVG: 3d and PaperJS.
来源:https://stackoverflow.com/questions/12311928/library-to-warp-text-on-html5-canvas-similar-to-csswarp-on-dom