I want to rotate a picture, in a way that it would work like tympanus's swatchbook.
But i rather not use, et CSS 3, as the previous link would require.
I rather do all the rotation on js, using, per instance, JQueryRotate, which is great except the rotation point, that is centered on te image.
Rather than point out a library that does it, I'd like to learn a good rotating method for an image, and specially, how do I change the point of the rotation, in that method, so I can achieve the swatchbook effect that i want.
But if you know a library that does it, I'd like it very much as well.
thanks
Edit:
While writing the question I realized something. I could enlarge the holder of that image. althoug is not very bright nor elegant, or very good, it is a start. I am going to check the sugestion made by x3ro : Image rotation algorithm
html snippet:
<script type="text/javascript" src="http://jqueryrotate.googlecode.com/svn/trunk/jQueryRotate.js"></script>
<div id="dvImg" style="position:relative;border: 1px solid black;">
<img src="https://www.google.com/images/srpr/logo3w.png" id="image" style="position:absolute;top:0;left:12px;margin:auto;border: 1px solid black;">
<div>
js snippet:
$("#dvImg").width($("#image").width()*2);
$("#dvImg").height($("#image").height()*2);
$("#image").css({ left: $("#image").width() + "px", top: $("#image").height()});
$("#image").mouseover(function() {
$("#dvImg").rotate({animateTo:90});
});