setscale oddities...

BlitzMax Forums/BlitzMax Beginners Area/setscale oddities...

Arowx(Posted 2008) [#1]


Try this at scale 1,1 it draws a nice curve from line segments and green circles on the start point and red on the end points.

But once the scale goes up instead of zooming in on the line and circles, the circles and lines drift off.

What am I doing wrong?


GfK(Posted 2008) [#2]
DrawOval's parameters are the X and Y coordinates of the top left corner of its 'bounding box', not the centre. So no matter what you set the scale to, that point is always going to be in the same place.

It also has width and height parameters, which *are* affected by SetScale.


Arowx(Posted 2008) [#3]
Dagnammit! ;0)

But that does not explain why the lines used to draw the curve end up wandering off creating a nice hedgehog effect?

I've updated the Oval drawing routine, to reflect the fact that the top left co-ords are not affected by the scaling values.

But how does this work with line drawing co-ords?