# Calculatw width

• Dec 7th 2009, 03:37 AM
wpfhelp
Calculatw width
Hi,
i have a issue with change the appearance width of rectangle, that is if the rectangle rotation is 0 degree change its original width, else if the rectangle is rotated in 90 degree then change its original height,

Rectangle height=100 width=50 and its rotation angle is 90 degree around center point, now i need to change the appearance width =appearance width *2, so how can calculate this with angle

• Dec 8th 2009, 01:54 AM
Hello wpfhelp
Quote:

Originally Posted by wpfhelp
Hi,
i have a issue with change the appearance width of rectangle, that is if the rectangle rotation is 0 degree change its original width, else if the rectangle is rotated in 90 degree then change its original height,

Rectangle height=100 width=50 and its rotation angle is 90 degree around center point, now i need to change the appearance width =appearance width *2, so how can calculate this with angle

As I understand it, the rules are: there are two possible angles of rotation: $0^o$ and $90^o$; and then:
If the angle of rotation is $0^o$, then
change the original width
else
change the original height.
In the problem you are given, the rotation angle is $90^o$, so we must change the original height, multiplying it by $2$. The original height was $100$ and the width $50$; so after the change, the dimensions of the rectangle are now $200 \times 50$.

• Dec 8th 2009, 02:29 AM
wpfhelp
Hi Grandad, Thank you for your reply, but i cant use if else loop to calculate this because, i need to calculate all possible values between 0-360 degree, now i am looking a solution like apperanceWidth = rectangle.Width * cos + rectangle.Height * sin; Thank you
• Dec 8th 2009, 04:09 AM
Hello wpfhelp

I still really don't understand what you're after here. Can you draw us a diagram?