描述
The PolyDraw function draws a set of line segments and B閦ier curves.
C++ 语法
BOOL PolyDraw( __in HDC hdc, __in const POINT* lppt, __in const BYTE *lpbTypes, __in int cCount ); |
PowerBASIC 语法
FUNCTION PolyDraw ( _ BYVAL hdc AS DWORD, _ BYREF lppt AS POINT, _ BYREF lpbTypes AS BYTE, _ BYVAL cCount AS LONG _ ) AS LONG |
参数
hdc
[in]处理设备环境。
lppt
[in] Pointer to an array of POINT structures that contains the endpoints for each line segment and the endpoints and control points for each B閦ier curve, in logical units.
lpbTypes
[in]指向数组的指针,指定如何使用lppt数组中的每个点。此参数可以是以下值之一。
类型 |
含义 |
PT_MOVETO |
指定此点启动不相交的数字。这一点成为新的当前位置。 |
PT_LINETO |
指定要从当前位置绘制一条直线,然后成为新的当前位置。 |
PT_BEZIERTO |
Specifies that this point is a control point or ending point for a B閦ier curve.
PT_BEZIERTO类型始终以三组的形式出现。The current position defines the starting point for the B閦ier curve.前两个PT_BEZIERTO点是控制点,第三个PT_BEZIERTO点是终点。结束点成为新的当前位置。如果没有三个连续的PT_BEZIERTO点,则会出现错误。 |
PT_LINETO或PT_BEZIERTO类型可以通过使用按位运算符“或”来表示对应点是图中的最后一个点,并且图形被关闭,可以与以下值组合。
类型 |
含义 |
PT_CLOSEFIGURE |
指定在PT_LINETO或PT_BEZIERTO类型为此点完成后,图形将自动关闭。从这一点将线条绘制到最近的PT_MOVETO或MoveToEx点。
This value is combined with the PT_LINETO type for a line, or with the PT_BEZIERTO type of the ending point for a B閦ier curve, by using the bitwise operator OR.
当前位置设置为关闭行的终点。 |
cCount
[in]指定lppt数组中的总点数,与lpbTypes数组中的字节数相同。
返回值
如果函数成功,返回值不为零。
如果函数失败,返回值为零。
备注
可以使用PolyDraw功能代替连续调用MoveToEx,LineTo和PolyBezierTo函数来绘制不相交的数字。线条和曲线使用当前笔绘制,图形未填充。如果通过调用BeginPath启动了一个活动路径,PolyDraw将添加到路径。
lppt数组和lpbTypes数组中包含的点表示每个点是否为MoveTo,LineTo或PolyBezierTo操作的一部分。也可以关闭数字。
此函数更新当前位置。
引用文件 #INCLUDE Once
WinGdi.inc(包括Windows.inc)