网站首页  词典首页

请输入您要查询的函数:

 

术语 getpath
释义 GetPath
语法:
int GetPath(
__in HDC hdc,
__out LPPOINT lpPoints,
__out LPBYTE lpTypes,
__in int nSize
);
GetPath函数
该GetPath函数检索坐标界定线端点和在所到指定的设备上下文路径中选择曲线的控制点。
参数
hdc [in]
句柄到一个设备上下文,它包含一个封闭的道路。
lpPoints [out]
对一个Point结构的数组,它接收线端点和曲线的控制点的指针,在逻辑坐标。
lpTypes [out]
对一个字节数组,它接收顶点类型的指针。此参数可以是下列值之一。
TypeDescription
PT_MOVETOSpecifies是在lpPoints参数对应点开始断续的数字。
PT_LINETOSpecifies,前点和lpPoints相应点是一条线的终点。
PT_BEZIERTOSpecifies在lpPoints的对应点是控制点或结束的Bezier曲线点。
PT_BEZIERTO价值观往往发生在3套。在紧接的路径指向他们定义了Bezier曲线的起点。前两个PT_BEZIERTO点是控制点,第三点是PT_BEZIERTO结束(如果硬编码)点。
阿PT_LINETO或PT_BEZIERTO值可结合下面的值(通过使用位运算符或)表明,相应的点是在最后一点的数字,这个数字应该关闭。
FlagDescription
PT_CLOSEFIGURESpecifies这个数字后自动关闭相应的行或曲线绘制。这个数字是关闭的绘制直线或曲线端点的点线对应于去年PT_MOVETO。
nSize [in]
在可存储在数组中点的总数指向lpPoints。该值必须作为字节数,可以在同一阵列中所指向的lpTypes。
返回值
如果nSize参数为非零值,返回值是多少分数枚举。如果nSize为0,则返回值的点的路径(和GetPath无关写入缓冲区的总数)。如果nSize为非零值,是比在路径点数目不足,则返回值为1。
GetLastError函数可能会返回下列错误代码之一:
ERROR_CAN_NOT_COMPLETE
ERROR_INVALID_PARAMETER
ERROR_BUFFER_OVERFLOW
备注
该设备的范畴内确定的HDC参数必须包含一个封闭的道路。
该路径的点返回逻辑坐标。点存储在设备路径坐标,因此GetPath更改设备坐标到逻辑通过使用当前转型逆坐标。
该FlattenPath函数可以调用之前GetPath在转换成线段路径中的所有曲线。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
路径概览
路径功能
FlattenPath

PolyDraw
WidenPath
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetPath Function
The GetPath function retrieves the coordinates defining the endpoints of lines and the control points of curves found in the path that is selected into the specified device context.
Syntax
int GetPath(
__in HDC hdc,
__out LPPOINT lpPoints,
__out LPBYTE lpTypes,
__in int nSize
);
Parameters
hdc [in]
A handle to a device context that contains a closed path.
lpPoints [out]
A pointer to an array of POINT structures that receives the line endpoints and curve control points, in logical coordinates.
lpTypes [out]
A pointer to an array of bytes that receives the vertex types. This parameter can be one of the following values.
TypeDescription
PT_MOVETOSpecifies that the corresponding point in the lpPoints parameter starts a disjoint figure.
PT_LINETOSpecifies that the previous point and the corresponding point in lpPoints are the endpoints of a line.
PT_BEZIERTOSpecifies that the corresponding point in lpPoints is a control point or ending point for a Bèzier curve.
PT_BEZIERTO values always occur in sets of three. The point in the path immediately preceding them defines the starting point for the Bèzier curve. The first two PT_BEZIERTO points are the control points, and the third PT_BEZIERTO point is the ending (if hard-coded) point.

A PT_LINETO or PT_BEZIERTO value may be combined with the following value (by using the bitwise operator OR) to indicate that the corresponding point is the last point in a figure and the figure should be closed.
FlagDescription
PT_CLOSEFIGURESpecifies that the figure is automatically closed after the corresponding line or curve is drawn. The figure is closed by drawing a line from the line or curve endpoint to the point corresponding to the last PT_MOVETO.

nSize [in]
The total number of POINT structures that can be stored in the array pointed to by lpPoints. This value must be the same as the number of bytes that can be placed in the array pointed to by lpTypes.
Return Value
If the nSize parameter is nonzero, the return value is the number of points enumerated. If nSize is 0, the return value is the total number of points in the path (and GetPath writes nothing to the buffers). If nSize is nonzero and is less than the number of points in the path, the return value is 1.
GetLastError may return one of the following error codes:
ERROR_CAN_NOT_COMPLETE
ERROR_INVALID_PARAMETER
ERROR_BUFFER_OVERFLOW
Remarks
The device context identified by the hdc parameter must contain a closed path.
The points of the path are returned in logical coordinates. Points are stored in the path in device coordinates, so GetPath changes the points from device coordinates to logical coordinates by using the inverse of the current transformation.
The FlattenPath function may be called before GetPath to convert all curves in the path into line segments.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Paths Overview
Path Functions
FlattenPath
POINT
PolyDraw
WidenPath
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144908(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:31:54