Hi..
How to find no. of point in Path of text.
As per as VC++ I used following code for getting no. of point.
// use a path to record how the text was drawn
pDC->BeginPath();
pDC->TextOut(10, 10, _T("Hockey is Best!"));
pDC->EndPath();
pDC->BeginPath();
pDC->TextOut(10, 10, _T("Hockey is Best!"));
pDC->EndPath();
To copy to clipboard, switch view to plain text mode
// for long strings or complex fonts, this number might be
int nNumPts = pDC->GetPath(NULL, NULL, 0);
int nNumPts = pDC->GetPath(NULL, NULL, 0);
To copy to clipboard, switch view to plain text mode
// Allocate memory to hold points and stroke types from the path.
LPPOINT lpPoints = new POINT[nNumPts];
LPBYTE lpTypes = new BYTE[nNumPts];
LPPOINT lpPoints = new POINT[nNumPts];
LPBYTE lpTypes = new BYTE[nNumPts];
To copy to clipboard, switch view to plain text mode
// Now that we have the memory, really get the path data.
nNumPts = pDC->GetPath(lpPoints, lpTypes, nNumPts);
PolyDraw(pDC, lpPoints, lpTypes, nNumPts);
nNumPts = pDC->GetPath(lpPoints, lpTypes, nNumPts);
PolyDraw(pDC, lpPoints, lpTypes, nNumPts);
To copy to clipboard, switch view to plain text mode
Waiting for quick reply..
Thanks..
Bookmarks