BoundingArc


@ComplicationExperimental
class BoundingArc


In combination with a bounding Rect, BoundingArc describes the geometry of an edge complication.

Summary

Public constructors

BoundingArc(startAngle: Float, totalAngle: Float, thickness: @Px Float)

Public functions

open operator Boolean
equals(other: Any?)
open Int
Boolean
hitTest(rect: Rect, x: @Px Float, y: @Px Float)

Detects whether the supplied point falls within the edge complication's arc.

open String

Public properties

Float

The staring angle of the arc in degrees (0 degrees = 12 o'clock position).

Float

The thickness of the arc as a fraction of min(boundingRect.width, boundingRect.height).

Float

The total angle of the arc on degrees.

Public constructors

BoundingArc

Added in 1.2.0
BoundingArc(startAngle: Float, totalAngle: Float, thickness: @Px Float)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

hitTest

Added in 1.2.0
fun hitTest(rect: Rect, x: @Px Float, y: @Px Float): Boolean

Detects whether the supplied point falls within the edge complication's arc.

Parameters
rect: Rect

The bounding Rect of the edge complication

x: @Px Float

The x-coordinate of the point to test in pixels

y: @Px Float

The y-coordinate of the point to test in pixels

Returns
Boolean

Whether or not the point is within the arc

toString

open fun toString(): String

Public properties

startAngle

Added in 1.2.0
val startAngleFloat

The staring angle of the arc in degrees (0 degrees = 12 o'clock position).

thickness

Added in 1.2.0
val thicknessFloat

The thickness of the arc as a fraction of min(boundingRect.width, boundingRect.height).

totalAngle

Added in 1.2.0
val totalAngleFloat

The total angle of the arc on degrees.