resize rectangle [modified]
-
I am using VC# GDI+ When i click on the form, a rectangle with Tracker (with resize and rotate options) is added. I can resize rectangle by dragging the corners of the rectangle (tracker). I can rotate it too. When the rectangle does not have any rotation, if i drag the topleft corner, the logic is moving Rectangle's X and Y position and modifying the width and height, then it works fine. But the question is that after i have rotated the rectangle (ex:30 degrees), the TopLeft corner dragging will take something wrong with the Top/Left moving and width/Height modifying logic. How can I correctly resize the element which has been rotated? or how can I correctly calculate the Top/Left displacement through the TopLeft corner dragging? Thank you in advance.
modified on Thursday, January 31, 2008 8:16:40 AM
-
I am using VC# GDI+ When i click on the form, a rectangle with Tracker (with resize and rotate options) is added. I can resize rectangle by dragging the corners of the rectangle (tracker). I can rotate it too. When the rectangle does not have any rotation, if i drag the topleft corner, the logic is moving Rectangle's X and Y position and modifying the width and height, then it works fine. But the question is that after i have rotated the rectangle (ex:30 degrees), the TopLeft corner dragging will take something wrong with the Top/Left moving and width/Height modifying logic. How can I correctly resize the element which has been rotated? or how can I correctly calculate the Top/Left displacement through the TopLeft corner dragging? Thank you in advance.
modified on Thursday, January 31, 2008 8:16:40 AM
Try wrote:
I am using VC++ GDI+
Thats your problem right there, this is the c# board. :doh: And how can we advise you on what your doing wrong, if you don't post a snippet of the 'logic' you are using.
My current favourite word is: Nipple!
-SK Genius
-
Try wrote:
I am using VC++ GDI+
Thats your problem right there, this is the c# board. :doh: And how can we advise you on what your doing wrong, if you don't post a snippet of the 'logic' you are using.
My current favourite word is: Nipple!
-SK Genius
-
Try wrote:
Oh! I am sorry. I am actually using VC#. I have edited the post.. Confusion...
You still forgot to post your code. Without that, how can we see what you are doing wrong, or make different suggestions, etc etc. You know? :)
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer