RenderingUtils.DrawText

DrawText(Font, string, double)

在位图中渲染文本。以 PNG 格式的字节流返回结果

public static Stream DrawText(Font font, string text, double fontSize)
参数类型描述
字体字体字体
文本String文本
fontSizeDouble字体大小

返回值

以 PNG 格式的字节流形式的图像

另见


DrawText(Font, string, double, LineSpacingType, int, int)

在位图中渲染文本。以 PNG 格式的字节流返回结果

public static Stream DrawText(Font font, string text, double fontSize, 
    LineSpacingType lineSpacingType, int lineSpacingValue, int maxWidth)
参数类型描述
字体字体字体
文本String文本
fontSizeDouble字体大小
lineSpacingTypeLineSpacingType行间距的类型。像素数或字体高度的百分比
lineSpacingValueInt32行间距的值
maxWidthInt32图像的最大宽度(像素)

返回值

以 PNG 格式的字节流形式的图像

另见


DrawText(Font, GlyphId[], double)

在位图中渲染文本。以 PNG 格式的字节流返回结果

public static Stream DrawText(Font font, GlyphId[] glyphIds, double fontSize)
参数类型描述
字体字体字体
glyphIdsGlyphId[]以 glyph 标识符数组表示的文本
fontSizeDouble字体大小

返回值

以 PNG 格式的字节流形式的图像

另见


DrawText(Font, GlyphId[], double, LineSpacingType, int, int)

在位图中渲染文本。以 PNG 格式的字节流返回结果

public static Stream DrawText(Font font, GlyphId[] glyphIds, double fontSize, 
    LineSpacingType lineSpacingType, int lineSpacingValue, int maxWidth)
参数类型描述
字体字体字体
glyphIdsGlyphId[]以 glyph 标识符数组表示的文本
fontSizeDouble字体大小
lineSpacingTypeLineSpacingType行间距的类型。像素数或字体高度的百分比
lineSpacingValueInt32行间距的值
maxWidthInt32图像的最大宽度(像素)

返回值

以 PNG 格式的字节流形式的图像

另见