Cover photo for post Centerpoint rotation in a nutshell

Centerpoint rotation in a nutshell

A little journey into the past is contained in my new dotgeek.org tutorial. During the actual development phase of Image_Text (which I will hopefully release this evening, with some amazing new features and improvements) I fought with that pretty math related problem of rotating an image object.

Take a look at positioning inside images in general. PHP (in combination with GD2) does that mainly in a unique way of giving the position of the top left (or bottom left) corner of an object to place it inside an image. That's quite fine, cause you can calculate the top left corner coords easily from the center point coords. But this changes if you have rotation involved.

I'm not quite shure, if it's the best idea to publish such stuff on dotgeek.org, since there is pretty much low-level and really dumb material on it. I guess the administrators of dotgeek should keep an eye on QA for their published information. Or do you really like abstracts about "Login script" or "Dynamic Webpage"? This place seems to become a challange about adding the highest amount of PHP related words in the shortest time, instead of a high quality knowledgebase and certification authority.