元編程參考文件

單線筆跡路徑

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