語言

Paint.GetTextRunAdvances 方法

定義

取得文本的字元進展。

[Android.Runtime.Register("getTextRunAdvances", "([CIIIIZ[FI)F", "GetGetTextRunAdvances_arrayCIIIIZarrayFIHandler", ApiSince=29)]
public virtual float GetTextRunAdvances(char[] chars, int index, int count, int contextIndex, int contextCount, bool isRtl, float[]? advances, int advancesIndex);
[<Android.Runtime.Register("getTextRunAdvances", "([CIIIIZ[FI)F", "GetGetTextRunAdvances_arrayCIIIIZarrayFIHandler", ApiSince=29)>]
abstract member GetTextRunAdvances : char[] * int * int * int * int * bool * single[] * int -> single
override this.GetTextRunAdvances : char[] * int * int * int * int * bool * single[] * int -> single

參數

chars
Char[]

要衡量的文本。

index
Int32

第一個要測量的字元的指標

count
Int32

要測量的字元數

contextIndex
Int32

第一個用來塑造上下文的字元索引。 情境必須涵蓋測量目標。

contextCount
Int32

用來塑造背景的字數。 情境必須涵蓋測量目標。

isRtl
Boolean

跑道是否朝 RTL 方向

advances
Single[]

陣列接收預付款,必須有空間容納所有預付款。 若只需全提前,則可視為無效

advancesIndex
Int32

在前進位置上,該移動位置對應起始字元的移動

傳回

像素總數的進步

屬性

備註

取得文本的字元進展。

回傳從 的indexcount字元中所有字元的總前進寬度,若advances非空,則返回分配給每個字元的前進寬度(java 字元)。

有效替代對中後方的代理節點被分配為0的前進。 因此,回傳的前進次數總是等於計數,而非由執行所代表的 Unicode 碼點數。

在連字或合併標記的情況下,總前進會分配給第一個邏輯字元,後面的字元則會被分配為 0。

此時會產生重排序叢集中字元的字形前進總和為叢集中第一個邏輯字元的寬度,以及叢集中其他所有字元的寬度為 0。 實際上,這類叢集被視為合取。

塑形界限限制了可用於塑形分析的起點與結束之外的上下文量。 這些界限通常反映 bidi 層級或字型指標的變化,這些參數不會發生塑形。

Java 文件 android.graphics.Paint.getTextRunAdvances(char[], int, int, int, int, boolean, float[], int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於