Font.GetGlyphBounds(Int32, Paint, RectF) Method

Definition

Retrieve the glyph horizontal advance and bounding box.

[Android.Runtime.Register("getGlyphBounds", "(ILandroid/graphics/Paint;Landroid/graphics/RectF;)F", "", ApiSince=31)]
public float GetGlyphBounds (int glyphId, Android.Graphics.Paint paint, Android.Graphics.RectF? outBoundingBox);
[<Android.Runtime.Register("getGlyphBounds", "(ILandroid/graphics/Paint;Landroid/graphics/RectF;)F", "", ApiSince=31)>]
member this.GetGlyphBounds : int * Android.Graphics.Paint * Android.Graphics.RectF -> single

Parameters

glyphId
Int32

a glyph ID

paint
Paint

a paint object used for resolving glyph style

outBoundingBox
RectF

a nullable destination object. If null is passed, this function just return the horizontal advance. If non-null is passed, this function fills bounding box information to this object.

Returns

the amount of horizontal advance in pixels

Attributes

Remarks

Retrieve the glyph horizontal advance and bounding box.

Note that android.graphics.Typeface in android.graphics.Paint is ignored.

Java documentation for android.graphics.fonts.Font.getGlyphBounds(int, android.graphics.Paint, android.graphics.RectF).

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