1. ## 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

2. Hello wpfhelp
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: $\displaystyle 0^o$ and $\displaystyle 90^o$; and then:
If the angle of rotation is $\displaystyle 0^o$, then
change the original width
else
change the original height.
In the problem you are given, the rotation angle is $\displaystyle 90^o$, so we must change the original height, multiplying it by $\displaystyle 2$. The original height was $\displaystyle 100$ and the width $\displaystyle 50$; so after the change, the dimensions of the rectangle are now $\displaystyle 200 \times 50$.

3. 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

4. Hello wpfhelp

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