About GoDrawing

I use GoDrawing(GoFigure.Rectangle).

When GoDrawing is rotated at specific angle, if rotated GoDrawing rectangle area have to contain some points, how can I resize GoDrawing in code?

I calculated rotated rectangle area that contains the points and then set rectangle points to GoDrawing by SetPoint() method to fit GoDrawing to the calculated rectangle.

It seems to be ok. But it throws Arithmetic OverflowException sometime when I rotate GoDrawing at other angle.

How can I set the points to GoDrawing?

GoDrawing must be kept rotated rectangle form.

Sorry for my bad english.

so… you want the rotated rectangle to fit inside the bounds of the original unrotated rectangle,
so you change the size to fit?

You don’t need to call SetPoint. Just make the Size smaller and then set Angle.

The points of GoFigure.Rectangle are just 0,0 1,0 1,1 0,1. they get scaled/translated as needed.

I substitute Size property for SetPoint() method.
It seems to be working fine. Until now, it don’t throw exception.
Thanks a lot, Jake.