Click here to Skip to main content
16,007,932 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataGridView updating datasource problem Pin
half-life6-Apr-09 2:03
half-life6-Apr-09 2:03 
GeneralRe: DataGridView updating datasource problem Pin
Henry Minute6-Apr-09 2:08
Henry Minute6-Apr-09 2:08 
QuestionSizing issue with rotate Graphic Pin
FrankeyJames5-Apr-09 20:22
FrankeyJames5-Apr-09 20:22 
AnswerRe: Sizing issue with rotate Graphic Pin
Christian Graus5-Apr-09 20:29
protectorChristian Graus5-Apr-09 20:29 
GeneralRe: Sizing issue with rotate Graphic Pin
FrankeyJames5-Apr-09 20:57
FrankeyJames5-Apr-09 20:57 
GeneralRe: Sizing issue with rotate Graphic Pin
Christian Graus5-Apr-09 21:07
protectorChristian Graus5-Apr-09 21:07 
GeneralRe: Sizing issue with rotate Graphic Pin
FrankeyJames5-Apr-09 21:19
FrankeyJames5-Apr-09 21:19 
GeneralRe: Sizing issue with rotate Graphic Pin
Luc Pattyn6-Apr-09 3:14
sitebuilderLuc Pattyn6-Apr-09 3:14 
Hi again,

As you figured out, it is easiest to translate things such that the origin is at the center.

These are the equations that rotate a point (x1,y1) around the origin over an angle alpha, whose cosine and sine are cosa and sina:
x2 =  x1 * cosa + y1 * sina
y2 = -x1 * sina + y1 * cosa


If you apply that to the rightmost top and bottom points (W1/2,H1/2) and (W1/2, -H1/2) where W1 and H1 are original width and height, you get two new points one of which will have the extreme X value (hence half of the new width) the other the extreme Y value (half of the new height).

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


QuestionHow to Execute C# / SQL statement in outlook Pin
dabuskol5-Apr-09 20:14
dabuskol5-Apr-09 20:14 
AnswerRe: How to Execute C# / SQL statement in outlook Pin
Christian Graus5-Apr-09 20:21
protectorChristian Graus5-Apr-09 20:21 
QuestionHow to make FTP Pin
E_Gold5-Apr-09 19:56
E_Gold5-Apr-09 19:56 
AnswerRe: How to make FTP Pin
Rajdeep.NET is BACK5-Apr-09 20:03
Rajdeep.NET is BACK5-Apr-09 20:03 
GeneralRe: How to make FTP Pin
stancrm5-Apr-09 21:03
stancrm5-Apr-09 21:03 
QuestionHow to preserve file attributes Pin
sumit70345-Apr-09 19:51
sumit70345-Apr-09 19:51 
AnswerRe: How to preserve file attributes Pin
stancrm5-Apr-09 21:04
stancrm5-Apr-09 21:04 
QuestionHiding a process....help guys! Pin
Rajdeep.NET is BACK5-Apr-09 19:45
Rajdeep.NET is BACK5-Apr-09 19:45 
AnswerRe: Hiding a process....help guys! Pin
King Julien5-Apr-09 20:19
King Julien5-Apr-09 20:19 
GeneralRe: Hiding a process....help guys! Pin
Christian Graus5-Apr-09 20:30
protectorChristian Graus5-Apr-09 20:30 
GeneralRe: Hiding a process....help guys! Pin
King Julien5-Apr-09 20:48
King Julien5-Apr-09 20:48 
GeneralRe: Hiding a process....help guys! Pin
Rajdeep.NET is BACK5-Apr-09 21:36
Rajdeep.NET is BACK5-Apr-09 21:36 
AnswerRe: Hiding a process....help guys! Pin
Christian Graus5-Apr-09 20:31
protectorChristian Graus5-Apr-09 20:31 
GeneralRe: Hiding a process....help guys! Pin
King Julien5-Apr-09 20:55
King Julien5-Apr-09 20:55 
AnswerRe: Hiding a process....help guys! Pin
stancrm5-Apr-09 21:28
stancrm5-Apr-09 21:28 
QuestionFor loop Pin
Sajjad Leo5-Apr-09 19:41
Sajjad Leo5-Apr-09 19:41 
AnswerRe: For loop Pin
Christian Graus5-Apr-09 19:44
protectorChristian Graus5-Apr-09 19:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.