單線筆跡路徑
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 陣列> |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 單線筆跡路徑
- 所屬包
- 影像處理