网站首页  词典首页

请输入您要查询的函数:

 

术语 getglyphoutline
释义 GetGlyphOutline
语法:
DWORD GetGlyphOutline(
__in HDC hdc,
__in UINT uChar,
__in UINT uFormat,
__out LPGLYPHMETRICS lpgm,
__in DWORD cbBuffer,
__out LPVOID lpvBuffer,
__in const MAT2 *lpmat2
);
GetGlyphOutline函数
该GetGlyphOutline函数检索为在的TrueType字体,到指定的设备上下文所选字符的轮廓或位图。
参数
hdc [in]
一个句柄,设备上下文。
uChar [in]
字符的数据,它要返回。
uFormat [in]
的数据格式,检索的功能。此参数可以是下列值之一。
ValueMeaning
GGO_BEZIERThe函数检索作为cubice贝塞尔样条(不二次样条格式)的曲线数据。
GGO_BITMAPThe函数检索字形位图。有关内存分配的信息,请参阅下面的备注部分。
GGO_GLYPH_INDEXIndicates的uChar参数是一个TrueType字型指数,而不是一个字符代码。见的字形索引补充意见的ExtTextOut功能。
GGO_GRAY2_BITMAPThe函数检索一个标志符号位图,它包含五个灰色的Level。
GGO_GRAY4_BITMAPThe函数检索一个标志符号位图,其中包含17个灰度级。
GGO_GRAY8_BITMAPThe函数检索一个标志符号,它包含65位的灰度级。
GGO_METRICSThe函数只检索GLYPHMETRICS结构lpgm指定。该lpvBuffer被忽略。此值会影响失败后,该函数的返回值的含义,见返回值部分。
GGO_NATIVEThe函数检索在光栅的本机格式数据点的曲线,并使用该字体的设计单位。
GGO_UNHINTEDThe函数只返回unhinted轮廓。这个标志只能在GGO_BEZIER和GGO_NATIVE一起。
请注意,对于GGO_GRAYn_BITMAP值,函数检索一个标志符号位图,它包含n ^ 2 +1(不适用的平方加一)的灰度级。
lpgm [out]
向GLYPHMETRICS结构的指针描述中的字符单元字形布局。
cbBuffer [in]
大小,以字节的缓冲区(* lpvBuffer)在职能是对大纲复制字符的信息。如果该值为0,则函数返回缓冲区的所需大小。
lpvBuffer [out]
一个缓冲区,接收关于纲要的字符信息的指针。如果该值为NULL,则函数返回缓冲区所需的大小。
lpmat2 [in]
一个 MAT2结构的指针指定的字符变换矩阵。
返回值
如果GGO_BITMAP,GGO_GRAY2_BITMAP,GGO_GRAY4_BITMAP,GGO_GRAY8_BITMAP,或GGO_NATIVE指定的函数执行成功,则返回值大于零,否则,返回值是GDI_ERROR。如果这些标志之一是指定的缓冲区大小或地址为零,则返回值指定所需的缓冲区大小,以字节为单位。
如果GGO_METRICS指定的函数失败,返回值是GDI_ERROR。
备注
在字形轮廓的GetGlyphOutline函数返回的是一个网格,配备字形。 (网格贴字形是一个已被修改,以便符合它的位图图像尽可能向字形原设计的字形。)如果应用程序需要一个未经修改的字形轮廓,它可以提出一个字符的字形轮廓在字体的大小等于字体的时间单位。对于字体的时间单位值存储在OUTLINETEXTMETRIC结构otmEMSquare成员。
位图的标志符号由GetGlyphOutline指定时GGO_BITMAP返回是一个DWORD对齐,行为导向,单色位图。当GGO_GRAY2_BITMAP指定,返回的位图是一个DWORD对齐,行字节的值从0到4范围面向数组。当GGO_GRAY4_BITMAP指定,返回的位图是一个DWORD对齐,行字节的值从0到16范围内为导向的数组。当GGO_GRAY8_BITMAP指定,返回的位图是一个DWORD对齐,行字节的值从0到64范围内面向数组。
本机缓冲区GetGlyphOutline返回时GGO_NATIVE指定是一个字形轮廓。甲字形轮廓是回来了由一个或多个曲线奉行TTPOLYGONHEADER结构定义一个或多个轮廓系列。中的每个轮廓曲线的定义是由POINTFX数据点的数量奉行TTPOLYCURVE结构。 POINTFX点的绝对位置,而不是相对移动。一个轮廓的出发点是考虑由TTPOLYGONHEADER结构pfxStart成员。每个曲线的出发点是以前的曲线最后一点或轮廓的起点。数据点的曲线计数存储在TTPOLYCURVE结构的环丙沙星的成员。每个在缓冲区外形大小,以字节,存储在文件的TTPOLYGONHEADER结构的成员。附加曲线定义都挤在前面的缓冲区以下的和额外的轮廓曲线分为以下的缓冲包装上的轮廓。缓冲区包含如安多轮廓内GetGlyphOutline返回的缓冲区。
指定的GLYPHMETRICS结构单元内的字符的字符单元格的宽度和位置的一个标志符号。字符的细胞来源,是位于左侧的单元格在字体的基线。在原产地的标志符号的位置是相对的性质细胞来源。一个字符单元格高度,基线,和全球的字体其他指标给出的OUTLINETEXTMETRIC结构。
应用程序可以改变图像和原始格式检索指定一个2 × 2的lpMatrix参数变换矩阵的字符。例如字形可以通过剪切,旋转,缩放,或任何使用矩阵乘法三个结合修改。
上一字形的更多信息,概述了位于TrueType字体和OpenType技术规格。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode和ANSI namesGetGlyphOutlineW(Unicode)和GetGlyphOutlineA(ANSI)的
参见
字体和文字概述
字体和文本函数
ExtTextOut
FORM_INFO_1
GetOutlineTextMetrics
GLYPHMETRICS
MAT2
OUTLINETEXTMETRIC

POINTFX
TTPOLYCURVE
TTPOLYGONHEADER
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetGlyphOutline Function
The GetGlyphOutline function retrieves the outline or bitmap for a character in the TrueType font that is selected into the specified device context.
Syntax
DWORD GetGlyphOutline(
__in HDC hdc,
__in UINT uChar,
__in UINT uFormat,
__out LPGLYPHMETRICS lpgm,
__in DWORD cbBuffer,
__out LPVOID lpvBuffer,
__in const MAT2 *lpmat2
);
Parameters
hdc [in]
A handle to the device context.
uChar [in]
The character for which data is to be returned.
uFormat [in]
The format of the data that the function retrieves. This parameter can be one of the following values.
ValueMeaning
GGO_BEZIERThe function retrieves the curve data as a cubice Bèzier spline (not in quadratic spline format).
GGO_BITMAPThe function retrieves the glyph bitmap. For information about memory allocation, see the following Remarks section.
GGO_GLYPH_INDEXIndicates that the uChar parameter is a TrueType Glyph Index rather than a character code. See the ExtTextOut function for additional remarks on Glyph Indexing.
GGO_GRAY2_BITMAPThe function retrieves a glyph bitmap that contains five levels of gray.
GGO_GRAY4_BITMAPThe function retrieves a glyph bitmap that contains 17 levels of gray.
GGO_GRAY8_BITMAPThe function retrieves a glyph bitmap that contains 65 levels of gray.
GGO_METRICSThe function only retrieves the GLYPHMETRICS structure specified by lpgm. The lpvBuffer is ignored. This value affects the meaning of the function's return value upon failure; see the Return Values section.
GGO_NATIVEThe function retrieves the curve data points in the rasterizer's native format and uses the font's design units.
GGO_UNHINTEDThe function only returns unhinted outlines. This flag only works in conjunction with GGO_BEZIER and GGO_NATIVE.

Note that, for the GGO_GRAYn_BITMAP values, the function retrieves a glyph bitmap that contains n^2+1 (n squared plus one) levels of gray.
lpgm [out]
A pointer to the GLYPHMETRICS structure describing the placement of the glyph in the character cell.
cbBuffer [in]
The size, in bytes, of the buffer (*lpvBuffer) where the function is to copy information about the outline character. If this value is zero, the function returns the required size of the buffer.
lpvBuffer [out]
A pointer to the buffer that receives information about the outline character. If this value is NULL, the function returns the required size of the buffer.
lpmat2 [in]
A pointer to a MAT2 structure specifying a transformation matrix for the character.
Return Value
If GGO_BITMAP, GGO_GRAY2_BITMAP, GGO_GRAY4_BITMAP, GGO_GRAY8_BITMAP, or GGO_NATIVE is specified and the function succeeds, the return value is greater than zero; otherwise, the return value is GDI_ERROR. If one of these flags is specified and the buffer size or address is zero, the return value specifies the required buffer size, in bytes.
If GGO_METRICS is specified and the function fails, the return value is GDI_ERROR.
Remarks
The glyph outline returned by the GetGlyphOutline function is for a grid-fitted glyph. (A grid-fitted glyph is a glyph that has been modified so that its bitmapped image conforms as closely as possible to the original design of the glyph.) If an application needs an unmodified glyph outline, it can request the glyph outline for a character in a font whose size is equal to the font's em unit. The value for a font's em unit is stored in the otmEMSquare member of the OUTLINETEXTMETRIC structure.
The glyph bitmap returned by GetGlyphOutline when GGO_BITMAP is specified is a DWORD-aligned, row-oriented, monochrome bitmap. When GGO_GRAY2_BITMAP is specified, the bitmap returned is a DWORD-aligned, row-oriented array of bytes whose values range from 0 to 4. When GGO_GRAY4_BITMAP is specified, the bitmap returned is a DWORD-aligned, row-oriented array of bytes whose values range from 0 to 16. When GGO_GRAY8_BITMAP is specified, the bitmap returned is a DWORD-aligned, row-oriented array of bytes whose values range from 0 to 64.
The native buffer returned by GetGlyphOutline when GGO_NATIVE is specified is a glyph outline. A glyph outline is returned as a series of one or more contours defined by a TTPOLYGONHEADER structure followed by one or more curves. Each curve in the contour is defined by a TTPOLYCURVE structure followed by a number of POINTFX data points. POINTFX points are absolute positions, not relative moves. The starting point of a contour is given by the pfxStart member of the TTPOLYGONHEADER structure. The starting point of each curve is the last point of the previous curve or the starting point of the contour. The count of data points in a curve is stored in the cpfx member of TTPOLYCURVE structure. The size of each contour in the buffer, in bytes, is stored in the cb member of TTPOLYGONHEADER structure. Additional curve definitions are packed into the buffer following preceding curves and additional contours are packed into the buffer following preceding contours. The buffer contains as many contours as fit within the buffer returned by GetGlyphOutline.
The GLYPHMETRICS structure specifies the width of the character cell and the location of a glyph within the character cell. The origin of the character cell is located at the left side of the cell at the baseline of the font. The location of the glyph origin is relative to the character cell origin. The height of a character cell, the baseline, and other metrics global to the font are given by the OUTLINETEXTMETRIC structure.
An application can alter the characters retrieved in bitmap or native format by specifying a 2-by-2 transformation matrix in the lpMatrix parameter. For example the glyph can be modified by shear, rotation, scaling, or any combination of the three using matrix multiplication.
Additional information on a glyph outlines is located in the TrueType and the OpenType technical specifications.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode and ANSI namesGetGlyphOutlineW (Unicode) and GetGlyphOutlineA (ANSI)
See Also
Fonts and Text Overview
Font and Text Functions
ExtTextOut
FORM_INFO_1
GetOutlineTextMetrics
GLYPHMETRICS
MAT2
OUTLINETEXTMETRIC
POINT
POINTFX
TTPOLYCURVE
TTPOLYGONHEADER
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144891(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:27:28