單線書寫
3 個節點
本頁內容 3
測量墨跡
函數The rectangle the ink of a run occupies, relative to the run's origin, without the nib's
own width.
簽名
測量墨跡 -> (低精度數字, 低精度數字, 低精度數字, 低精度數字)
字型: Stroke Font
文字: 文字
大寫字母高度: 低精度數字
傾斜: 低精度數字(float, float, float, float) MeasureInk(
StrokeFont font,
string text,
float capHeight,
float slant = -0.1f)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 字型 | Stroke Font | — | |
| 文字 | 文字 | — | |
| 大寫字母高度 | 低精度數字 | — | |
| 傾斜 | 低精度數字 | -0.1 |
返回
| 結果 | (低精度數字, 低精度數字, 低精度數字, 低精度數字) |
備註
Traced rather than derived from the font's metrics, because that is the only answer that is
right for a face whose glyphs lean and overshoot. A run that puts no ink on the paper at all -
nothing but spaces - reports its advance by the cap height instead, so that a caller sizing an
image around it gets a picture rather than a one-pixel sliver.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 單線書寫
- 所屬包
- 影像處理
書寫文字
函數Writes a run of text into a new image sized to the ink.
簽名
書寫文字 -> Pixel Image
文字: 文字
字型: Stroke Font
大寫字母高度: 低精度數字
墨水顏色: 可選顏色
背景顏色: 可選顏色
內邊距: 低精度數字
傾斜: 低精度數字
筆: Nib
進度: 低精度數字PixelImage WriteText(
string text,
StrokeFont font,
float capHeight = 64f,
ColorElement? inkColor,
ColorElement? backgroundColor,
float padding = 16f,
float slant = -0.1f,
Nib pen,
float progress = 1f)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 文字 | 文字 | — | The text to write. |
| 字型 | Stroke Font | — | The face to write with; the embedded Hershey Script when not given. |
| 大寫字母高度 | 低精度數字 | 64 | Height from baseline to cap line, in pixels. |
| 墨水顏色 | 可選顏色 | — | The ink. Black when not given. |
| 背景顏色 | 可選顏色 | — | The paper. Transparent when not given. |
| 內邊距 | 低精度數字 | 16 | Margin around the ink, in pixels. |
| 傾斜 | 低精度數字 | -0.1 | Shear per unit of height; negative leans right, as a hand does. |
| 筆 | Nib | — | The nib to sweep; a fountain pen scaled to the cap height when not given. |
| 進度 | 低精度數字 | 1 | How much of the pen's journey to show, 0 to 1. |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 單線書寫
- 所屬包
- 影像處理
書寫到影像上
函數Writes a run of text onto an image the caller already has.
簽名
書寫到影像上 -> Pixel Image
原圖: Pixel Image
文字: 文字
X: 低精度數字
基線: 低精度數字
字型: Stroke Font
大寫字母高度: 低精度數字
墨水顏色: 可選顏色
傾斜: 低精度數字
筆: Nib
進度: 低精度數字
就地: 真否PixelImage WriteTextOnto(
PixelImage original,
string text,
float x,
float baseline,
StrokeFont font,
float capHeight = 64f,
ColorElement? inkColor,
float slant = -0.1f,
Nib pen,
float progress = 1f,
bool inPlace = true)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 原圖 | Pixel Image | — | The image to write on. |
| 文字 | 文字 | — | The text to write. |
| X | 低精度數字 | — | Where the run starts. |
| 基線 | 低精度數字 | — | The baseline the run sits on. |
| 字型 | Stroke Font | — | The face to write with; the embedded Hershey Script when not given. |
| 大寫字母高度 | 低精度數字 | 64 | Height from baseline to cap line, in pixels. |
| 墨水顏色 | 可選顏色 | — | The ink. Black when not given. |
| 傾斜 | 低精度數字 | -0.1 | Shear per unit of height; negative leans right, as a hand does. |
| 筆 | Nib | — | The nib to sweep; a fountain pen scaled to the cap height when not given. |
| 進度 | 低精度數字 | 1 | How much of the pen's journey to show, 0 to 1. |
| 就地 | 真否 | True | Whether to write onto the caller's image or onto a copy. |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 單線書寫
- 所屬包
- 影像處理