PDA

View Full Version : Real Quickun



code_glitch
20-12-2010, 09:26 AM
Now this is one decision I cant make. On rectangles I've set it so you define the width and height of the rectangle and it draws down and right of the draw co-ordinates. However, for triangles and pentagons that have no upper left corner (this might confuse newbies) should I set prometheus to draw from the center of the shape?? or Should I do that with all of them? Or should I add a procedure to switch it round?

Just a confusing set of thoughts... ???

I am writing an article that overviews the changes so y'all can see how this is taking shape. :)

Andru
20-12-2010, 10:22 AM
Make two functions with different functionality - one with render from left top corner, and second one - with render from center of shape. But more obvious is rendering from left top corner, and I made only this function, because variant where rendering starts from center - not needed so often :)

VilleK
20-12-2010, 10:31 AM
For me it makes most sense to make the default origin of each object at its center, especially if you support rotated objects because most people would expect rotation to be around the center. You could also make it more general if a user can redefine the origin with a object.SetOrigin(x,y) call.

code_glitch
21-12-2010, 07:31 AM
Now that is one heck of a good isea there VilleK. Why didn't I think of that??? Oh well, leave for holiday soon so lots of time to develop ;) cheers for the info though.