BoundingArc

@ComplicationExperimental
public final class BoundingArc


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

Summary

Public constructors

BoundingArc(float startAngle, float totalAngle, @Px float thickness)

Public methods

boolean
equals(Object other)
final float

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

final float

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

final float

The total angle of the arc on degrees.

int
final boolean
hitTest(@NonNull Rect rect, @Px float x, @Px float y)

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

@NonNull String

Public constructors

BoundingArc

Added in 1.2.0
public BoundingArc(float startAngle, float totalAngle, @Px float thickness)

Public methods

equals

public boolean equals(Object other)

getStartAngle

Added in 1.2.0
public final float getStartAngle()

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

getThickness

Added in 1.2.0
public final float getThickness()

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

getTotalAngle

Added in 1.2.0
public final float getTotalAngle()

The total angle of the arc on degrees.

hashCode

public int hashCode()

hitTest

Added in 1.2.0
public final boolean hitTest(@NonNull Rect rect, @Px float x, @Px float y)

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

Parameters
@NonNull Rect rect

The bounding Rect of the edge complication

@Px float x

The x-coordinate of the point to test in pixels

@Px float y

The y-coordinate of the point to test in pixels

Returns
boolean

Whether or not the point is within the arc

toString

public @NonNull String toString()