单线笔迹路径
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 | 低精度数字 | 0 | Where the run starts. |
| 基线 | 低精度数字 | 0 | The baseline the run sits on. |
| 倾斜 | 低精度数字 | 0 | Shear applied per unit of height; negative leans right, as a hand does. |
| 字间距 | 低精度数字 | 0 | Extra 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 数组> |
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 单线笔迹路径
- 所属包
- 图像处理