Page 1 of 1

DRect.rotate - bad results???

Posted: 13 Oct 2013, 03:51
by flycast
I have the following code:

Code: Select all

Dim box As New DRect
box.left = 5
box.right = 10
box.top = 6
box.bottom = 5
I end up with a box as expected:
bottomRight.x: 10
bottomRight.y: 5
topLeft.x: 5
topLeft.y: 6
width: 5
height: 1
I execute:

Code: Select all

box.Rotate(90)
And I get:
bottomRight.x = 10
bottomRight.y = -10
topLeft.x = -10
topLeft.y = 10
width: 20
height: 20
I expect the box to have rotated either 90 degrees using the center of the box as the rotation point or 90 degrees into a different quadrant of an x,y plot.

Is this working as expected and I am misunderstanding the result?

Re: DRect.rotate - bad results???

Posted: 15 Oct 2013, 17:14
by support
Hello!

There is a problem with recalculating DRect coordinates after rotation. We will consider this problem. Thank you for your post!


Mikhail.