Click here to Skip to main content
15,890,609 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Rotate rerctangle in Bitmap Pin
raju_shiva17-Aug-10 22:38
raju_shiva17-Aug-10 22:38 
GeneralRe: Rotate rerctangle in Bitmap Pin
CPallini17-Aug-10 22:49
mveCPallini17-Aug-10 22:49 
GeneralRe: Rotate rerctangle in Bitmap Pin
raju_shiva17-Aug-10 23:13
raju_shiva17-Aug-10 23:13 
GeneralRe: Rotate rerctangle in Bitmap Pin
CPallini17-Aug-10 23:19
mveCPallini17-Aug-10 23:19 
GeneralRe: Rotate rerctangle in Bitmap Pin
raju_shiva17-Aug-10 23:45
raju_shiva17-Aug-10 23:45 
QuestionRe: Rotate rerctangle in Bitmap Pin
CPallini17-Aug-10 23:54
mveCPallini17-Aug-10 23:54 
AnswerRe: Rotate rerctangle in Bitmap Pin
raju_shiva18-Aug-10 0:16
raju_shiva18-Aug-10 0:16 
GeneralRe: Rotate rerctangle in Bitmap Pin
CPallini18-Aug-10 0:36
mveCPallini18-Aug-10 0:36 
You are defining the rectangle via offsets from center, that is
P0={-x1,-y2}, P1{-x1, y1}, P2={x2,y1}, P3={x2,-y2}

hence, if you wan't rotate with angle phi around the center, than you should compute:
Pr = { x * cos(phi) + y * sin(phi), -x * sin(phi) + y * cos(phi)}


i.e.:
P0R= { -x1 * cos(phi) -y2*sin(phi), x1 * sin(phi) - y2 * cos(phi)}
P1R =...
P2R =...
P3R =...


and then connect the center+PiR points the way you did before.
Smile | :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: Rotate rerctangle in Bitmap Pin
raju_shiva18-Aug-10 1:18
raju_shiva18-Aug-10 1:18 
GeneralRe: Rotate rerctangle in Bitmap Pin
CPallini18-Aug-10 1:47
mveCPallini18-Aug-10 1:47 
GeneralRe: Rotate rerctangle in Bitmap Pin
raju_shiva18-Aug-10 20:54
raju_shiva18-Aug-10 20:54 
GeneralRe: Rotate rerctangle in Bitmap Pin
CPallini18-Aug-10 20:59
mveCPallini18-Aug-10 20:59 
GeneralRe: Rotate rerctangle in Bitmap Pin
Rick York19-Aug-10 15:49
mveRick York19-Aug-10 15:49 
GeneralRe: Rotate rerctangle in Bitmap Pin
CPallini19-Aug-10 21:26
mveCPallini19-Aug-10 21:26 
AnswerRe: Rotate rerctangle in Bitmap Pin
Peter_in_278017-Aug-10 22:00
professionalPeter_in_278017-Aug-10 22:00 
GeneralRe: Rotate rerctangle in Bitmap Pin
raju_shiva17-Aug-10 22:39
raju_shiva17-Aug-10 22:39 
GeneralRe: Rotate rerctangle in Bitmap Pin
Peter_in_278018-Aug-10 12:08
professionalPeter_in_278018-Aug-10 12:08 
GeneralRe: Rotate rerctangle in Bitmap Pin
raju_shiva18-Aug-10 20:55
raju_shiva18-Aug-10 20:55 
QuestionProcess explorer Pin
Sakhalean17-Aug-10 18:45
Sakhalean17-Aug-10 18:45 
AnswerRe: Process explorer Pin
«_Superman_»17-Aug-10 19:05
professional«_Superman_»17-Aug-10 19:05 
AnswerRe: Process explorer Pin
Nuri Ismail17-Aug-10 20:44
Nuri Ismail17-Aug-10 20:44 
GeneralRe: Process explorer Pin
Sakhalean17-Aug-10 23:21
Sakhalean17-Aug-10 23:21 
GeneralRe: Process explorer Pin
Nuri Ismail18-Aug-10 1:41
Nuri Ismail18-Aug-10 1:41 
GeneralRe: Process explorer Pin
Sakhalean18-Aug-10 19:01
Sakhalean18-Aug-10 19:01 
GeneralRe: Process explorer Pin
Nuri Ismail19-Aug-10 0:10
Nuri Ismail19-Aug-10 0:10 

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.