Click here to Skip to main content
15,917,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to make yahoo like chat window? Pin
User 66584-Mar-03 7:37
User 66584-Mar-03 7:37 
GeneralRe: how to make yahoo like chat window? Pin
Abin4-Mar-03 18:06
Abin4-Mar-03 18:06 
GeneralCListCtrl - Combine Colums - CustomDraw Pin
AnTri4-Mar-03 7:04
AnTri4-Mar-03 7:04 
GeneralRe: CListCtrl - Combine Colums - CustomDraw Pin
valikac4-Mar-03 9:07
valikac4-Mar-03 9:07 
GeneralRe: CListCtrl - Combine Colums - CustomDraw Pin
AnTri4-Mar-03 9:38
AnTri4-Mar-03 9:38 
GeneralRe: CListCtrl - Combine Colums - CustomDraw Pin
valikac4-Mar-03 14:01
valikac4-Mar-03 14:01 
GeneralRe: CListCtrl - Combine Colums - CustomDraw Pin
AnTri5-Mar-03 5:07
AnTri5-Mar-03 5:07 
GeneralGraphicsPath::Outline problem (GDI+) Pin
grotesque4-Mar-03 5:22
grotesque4-Mar-03 5:22 
I'm having a problem with the Outline method not working after I've applied a certain transformation to the GraphicsPath object (see code below). The problem occurs after the GraphicsPath object is scaled with either the X factor or/and the Y factor set to a negative value (causing flip/mirror).

Code:

GraphicsPath path1;
GraphicsPath path2;

path1.AddString(L"GDI+", -1, &family, FontStyleRegular, 144, rect, &format);
path2.AddString(L"GDI+", -1, &family, FontStyleRegular, 144, rect, &format);

REAL offsetX = rect.GetLeft() + rect.Width / 2.0f;
REAL offsetY = rect.GetTop() + rect.Height / 2.0f;

Matrix matrix;
matrix.Translate(-offsetX, -offsetY, MatrixOrderAppend);
matrix.Scale(1.0f, -1.0f, MatrixOrderAppend);  // negative Y factor causing
                                                    // the path to "flip"
matrix.Translate(offsetX, offsetY + 110.0f, MatrixOrderAppend);

path2.Transform(&matrix);

Pen pen(Color(255, 255, 0, 0));

path1.AddPath(&path2,TRUE);
path1.Outline();   // fails due to the scaling transformation above
                        // the shapes overlap instead om "melting together"

pGraphics->DrawPath(&pen, &path1);



Any light on this problem would be much appreciated.Smile | :)

(Using VC 6.0 and the C++ version of GDI+)
GeneralAfxBeginThread Pin
Anonymous4-Mar-03 5:15
Anonymous4-Mar-03 5:15 
GeneralRe: AfxBeginThread Pin
Brian Shifrin4-Mar-03 5:33
Brian Shifrin4-Mar-03 5:33 
GeneralRe: AfxBeginThread Pin
Anonymous4-Mar-03 5:38
Anonymous4-Mar-03 5:38 
GeneralRe: AfxBeginThread Pin
Brian Shifrin4-Mar-03 7:19
Brian Shifrin4-Mar-03 7:19 
GeneralRe: AfxBeginThread Pin
Anders Molin4-Mar-03 14:47
professionalAnders Molin4-Mar-03 14:47 
GeneralRe: AfxBeginThread Pin
Anonymous7-Mar-03 0:41
Anonymous7-Mar-03 0:41 
GeneralOverriding Tab Key Pin
brianwelsch4-Mar-03 5:05
brianwelsch4-Mar-03 5:05 
GeneralRe: Overriding Tab Key Pin
Brian Shifrin4-Mar-03 5:19
Brian Shifrin4-Mar-03 5:19 
GeneralRe: Overriding Tab Key Pin
brianwelsch4-Mar-03 5:35
brianwelsch4-Mar-03 5:35 
GeneralRe: Overriding Tab Key Pin
Brian Shifrin4-Mar-03 7:15
Brian Shifrin4-Mar-03 7:15 
GeneralRe: Overriding Tab Key Pin
brianwelsch4-Mar-03 7:23
brianwelsch4-Mar-03 7:23 
GeneralRe: Overriding Tab Key Pin
Chris Richardson4-Mar-03 8:06
Chris Richardson4-Mar-03 8:06 
GeneralRe: Overriding Tab Key - DONE Pin
brianwelsch4-Mar-03 8:27
brianwelsch4-Mar-03 8:27 
GeneralRe: Overriding Tab Key - DONE Pin
Chris Richardson4-Mar-03 8:41
Chris Richardson4-Mar-03 8:41 
QuestionHow to reload a modified CDocument Pin
luedi4-Mar-03 4:57
luedi4-Mar-03 4:57 
AnswerRe: How to reload a modified CDocument Pin
Alvaro Mendez4-Mar-03 9:08
Alvaro Mendez4-Mar-03 9:08 
GeneralRe: How to reload a modified CDocument Pin
luedi4-Mar-03 12:08
luedi4-Mar-03 12:08 

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.