Click here to Skip to main content
15,881,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Rotate rerctangle in Bitmap Pin
raju_shiva18-Aug-10 1:18
raju_shiva18-Aug-10 1:18 
CPallini wrote:
P0R= { -x1 * cos(phi) -y2*sin(phi), x1 * sin(phi) - y2 * cos(phi)}


I am confused with it???

Now suppose my values are:
x1 = 330,x2 = 330,y1=330,y2=330
Origin(center.x,cebter.y) = Origin(525,454);


I have to do the get the new x1,x2,y1,y2 before calling MoveToEx and LineTo

Am i right??

i.e
Pr = { x * cos(phi) + y * sin(phi), -x * sin(phi) + y * cos(phi)}

for each x1,x2,y1,y2.

Then call the function

MoveToEx(pCellInfo->hDC,center.x-x1,center.y-y2,NULL); // where x1 = Pr1,x2=Pr2....y2 = Pr4
LineTo(pCellInfo->hDC,center.x-x1,center.y+y1);
LineTo(pCellInfo->hDC,center.x+x2,center.y+y1);
LineTo(pCellInfo->hDC,center.x+x2,center.y-y2);
LineTo(pCellInfo->hDC,center.x-x1,center.y-y2);



Thanks
Raj
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 
QuestionHow to validate a file path Pin
Danzy8317-Aug-10 10:32
Danzy8317-Aug-10 10:32 

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.