Layout.ComputeDrawingBoundingBox Method

Definition

Get an actual bounding box that draws text content.

[Android.Runtime.Register("computeDrawingBoundingBox", "()Landroid/graphics/RectF;", "GetComputeDrawingBoundingBoxHandler", ApiSince=35)]
public virtual Android.Graphics.RectF ComputeDrawingBoundingBox ();
[<Android.Runtime.Register("computeDrawingBoundingBox", "()Landroid/graphics/RectF;", "GetComputeDrawingBoundingBoxHandler", ApiSince=35)>]
abstract member ComputeDrawingBoundingBox : unit -> Android.Graphics.RectF
override this.ComputeDrawingBoundingBox : unit -> Android.Graphics.RectF

Returns

bounding rectangle

Attributes

Remarks

Get an actual bounding box that draws text content.

Note that the RectF#top and RectF#bottom may be different from the Layout#getLineTop(int) of the first line and Layout#getLineBottom(int) of the last line. The line top and line bottom are calculated based on yMin/yMax or ascent/descent value of font file. On the other hand, the drawing bounding boxes are calculated based on actual glyphs used there.

Java documentation for android.text.Layout.computeDrawingBoundingBox().

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