共用方式為


Layout.GetLineBounds(Int32, Rect) Method

Definition

Return the baseline for the specified line (0…getLineCount() - 1) If bounds is not null, return the top, left, right, bottom extents of the specified line in it.

[Android.Runtime.Register("getLineBounds", "(ILandroid/graphics/Rect;)I", "GetGetLineBounds_ILandroid_graphics_Rect_Handler")]
public virtual int GetLineBounds (int line, Android.Graphics.Rect? bounds);
[<Android.Runtime.Register("getLineBounds", "(ILandroid/graphics/Rect;)I", "GetGetLineBounds_ILandroid_graphics_Rect_Handler")>]
abstract member GetLineBounds : int * Android.Graphics.Rect -> int
override this.GetLineBounds : int * Android.Graphics.Rect -> int

Parameters

line
Int32

which line to examine (0..getLineCount() - 1)

bounds
Rect

Optional. If not null, it returns the extent of the line

Returns

the Y-coordinate of the baseline

Attributes

Remarks

Return the baseline for the specified line (0&hellip;getLineCount() - 1) If bounds is not null, return the top, left, right, bottom extents of the specified line in it.

Java documentation for android.text.Layout.getLineBounds(int, android.graphics.Rect).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to