在所有浏览器中旋转图片(IE中的画布?) [英] Rotating an image in all browsers (canvas in IE?)

查看:430
本文介绍了在所有浏览器中旋转图片(IE中的画布?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我终于得到了工作与帆布只发现它没有在IE中实现。我尝试从google浏览canvas,在Internet Explorer中使用它,但它不适用于我的代码( http:// uptowar .com / test.php - 一个小bug,虽然它不是在旋转时删除旧的图像)。

I finally got to work with canvas only to find out that it is not implemented in IE. I tried explore canvas from google to use it in Internet Explorer, but it's not working for my code (http://uptowar.com/test.php - little bug though that it is not removing the old image when rotating).

所以,有没有另一种方式顺利围绕它的底部中心角旋转图像?也许javascript?

So, is there an other way to smoothly rotate an image around it's bottom center angle? Maybe javascript? Or is there a way to do it with IE and canvas anyway?

编辑:谷歌Chrome浏览器似乎也添加了一个丑陋的边框的画布示例..必须有一个其他平滑的方式?

Google Chrome also seems to add an ugly border to the canvas example.. there must be an other smooth way?

Edit2:尝试了一个hacky的javascript方式:它导致市长滞后和破坏的形象( http://uptowar.com/test2.php ),任何人都知道一个工作方法?

tried a hacky javascript way: it causes mayor lags and corrupts the image (http://uptowar.com/test2.php), anyone knows of a working method?

推荐答案

RaphaelJS 是一个伟大的跨浏览器JavaScript库,可能完全按照您的需要。我强烈推荐它。如果您访问该网站,甚至有一个具体的例子,涉及旋转图像。

RaphaelJS is a great cross-browser JavaScript library that might do exactly what you need. I highly recommend it. If you visit the site there is even a specific example that involves rotating an image.

这篇关于在所有浏览器中旋转图片(IE中的画布?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆