Class

RemotePaintBounds

Contains the tight paint bounds measured by RemoteTextMeasurer.measurePaintBounds.

Source set: JvmAndAndroid
public class RemotePaintBounds(
    /**
     * Contains the tight left paint bound in pixels relative to the text origin.
     *
     * * Corresponds to [android.graphics.Rect.left] from [android.graphics.Paint.getTextBounds].
     */
    public val left: RemoteFloat,
    /**
     * Contains the tight top paint bound in pixels relative to the baseline (negative above
     * baseline).
     *
     * * Corresponds to [android.graphics.Rect.top] from [android.graphics.Paint.getTextBounds].
     */
    public val top: RemoteFloat,
    /**
     * Contains the tight right paint bound in pixels relative to the text origin.
     *
     * * Corresponds to [android.graphics.Rect.right] from [android.graphics.Paint.getTextBounds].
     */
    public val right: RemoteFloat,
    /**
     * Contains the tight bottom paint bound in pixels relative to the baseline (positive below
     * baseline).
     *
     * * Corresponds to [android.graphics.Rect.bottom] from [android.graphics.Paint.getTextBounds].
     */
    public val bottom: RemoteFloat,
)

Contains the tight paint bounds measured by RemoteTextMeasurer.measurePaintBounds.

Coordinates are in pixels relative to (0, 0) at the start of the text on its alphabetic baseline, matching android.graphics.Paint.getTextBounds:

    top and bottom into single-line layout-box y coordinates.

  • Add RemoteSingleLineTextBounds.baseline (baseline + top and baseline + bottom) to convert

Properties

width

Source set: JvmAndAndroid
public val width: RemoteFloat

Returns the tight paint width (right - left) in pixels.

height

Source set: JvmAndAndroid
public val height: RemoteFloat

Returns the tight paint height (bottom - top) in pixels.

Functions

equals

Source set: JvmAndAndroid
override fun equals(other: Any?): Boolean

hashCode

Source set: JvmAndAndroid
override fun hashCode(): Int

toString

Source set: JvmAndAndroid
override fun toString(): String
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: