元编程参考文档

单线笔迹路径

3 个节点

本页内容 3

测量

函数

The advance width of a run, in drawing units.

签名
测量 -> 低精度数字
    字体: Stroke Font
    文本: 文本
    大写字母高度: 低精度数字
    字间距: 低精度数字
float Measure(
    StrokeFont font,
    string text,
    float capHeight,
    float letterSpacing = 0f)

参数

名称类型默认值说明
字体Stroke Font—
文本文本—
大写字母高度低精度数字—
字间距低精度数字0

返回

结果低精度数字

备注

The advance, not the ink. The Hershey faces carry side bearings and a flourish on a cursive
face reaches past them, so a caller sizing an image around the text should measure the
traced points instead.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线笔迹路径
所属包
图像处理

描绘

函数

The pen path for a run of text: one polyline per pen-down..pen-up mark, in writing order,
glyph by glyph from left to right.

签名
描绘 -> IReadOnlyList<Vector2 数组>
    字体: Stroke Font
    文本: 文本
    大写字母高度: 低精度数字
    X: 低精度数字
    基线: 低精度数字
    倾斜: 低精度数字
    字间距: 低精度数字
IReadOnlyList<Vector2[]> Trace(
    StrokeFont font,
    string text,
    float capHeight,
    float x = 0f,
    float baseline = 0f,
    float slant = 0f,
    float letterSpacing = 0f)

参数

名称类型默认值说明
字体Stroke Font—The face to write with.
文本文本—The text to write. Characters the face lacks fall back to its '?'.
大写字母高度低精度数字—Height from baseline to cap line, in drawing units.
X低精度数字0Where the run starts.
基线低精度数字0The baseline the run sits on.
倾斜低精度数字0Shear applied per unit of height; negative leans right, as a hand does.
字间距低精度数字0Extra advance after each glyph, in drawing units.

返回

结果IReadOnlyList<Vector2 数组>
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线笔迹路径
所属包
图像处理

描绘字形

函数

The pen path for one glyph, placed with its origin at (Origin X, Baseline).

签名
描绘字形 -> IReadOnlyList<Vector2 数组>
    字形: Stroke Glyph
    大写字母高度: 低精度数字
    原点 X: 低精度数字
    基线: 低精度数字
    倾斜: 低精度数字
IReadOnlyList<Vector2[]> TraceGlyph(
    StrokeGlyph glyph,
    float capHeight,
    float originX = 0f,
    float baseline = 0f,
    float slant = 0f)

参数

名称类型默认值说明
字形Stroke Glyph—
大写字母高度低精度数字—
原点 X低精度数字0
基线低精度数字0
倾斜低精度数字0

返回

结果IReadOnlyList<Vector2 数组>
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
单线笔迹路径
所属包
图像处理