CodeRush Screenshot of the Week – Rotate 90 Degrees

You may have noticed this entry showing up in the Code menu and wondered “What does Rotate 90 Degrees do?”. This code provider is useful when you are working in a two-dimensional space, and you’ve written code to work in one dimension and you want to create similar code to work in the other dimension.

Here I’ve taken the first method, CalculateHorizontalPosition that works on the x-axis, copied it, and now I’m converting it into a functionally similar method that works on the y-axis:

Rotate90Degrees

So DeltaX becomes DeltaY, _HorizontalPosition becomes _VerticalPosition, Left becomes Top, StrongRight becomes StrongBottom (hmmm… maybe I should rename that), etc..

Seen something cool in CodeRush? Take a screenshot and send it to me (markm at the DevExpress domain). If we use your image we’ll send you one of these highly coveted CodeRush Nation t-shirts.

CodeRush Nation t-shirt

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
Joe Hendricks
Joe Hendricks

Very cool!

15 October 2010

Please login or register to post comments.