Article ID: 135059
Article Last Modified on 11/21/2006
/**********************************************************************
* *
* FUNCTION: PolyDraw95(HDC, LPPOINT, LPBYTE, int) *
* *
* PURPOSE: Draws the points returned from a call to GetPath() *
* to an HDC *
* *
* NOTES: This function is similar to the Windows NT PolyDraw *
* function, which draws a set of line segments and Bezier *
* curves. Because PolyDraw is not supported in Windows 95 *
* this PolyDraw95 function is used instead. *
* *
*********************************************************************/
BOOL PolyDraw95(HDC hdc, // handle of a device context
CONST LPPOINT lppt, // array of points
CONST LPBYTE lpbTypes, // line and curve identifiers
int cCount) // count of points
{
int i;
for (i=0; i<cCount; i++)
switch (lpbTypes[i]) {
case PT_MOVETO :
MoveToEx(hdc, lppt[i].x, lppt[i].y, NULL);
break;
case PT_LINETO | PT_CLOSEFIGURE:
case PT_LINETO :
LineTo(hdc, lppt[i].x, lppt[i].y);
break;
case PT_BEZIERTO | PT_CLOSEFIGURE:
case PT_BEZIERTO :
PolyBezierTo(hdc, &lppt[i], 3);
i+=2;
break;
}
}
Additional query words: 4.00 PolyDraw Draw Poly Stones Win95 GDI
Keywords: kbhowto KB135059