BoundingArc
@ComplicationExperimental
public final class BoundingArc
In combination with a bounding Rect, BoundingArc describes the geometry of an edge complication.
use Watch Face Format instead
Summary
Public constructors |
|---|
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public methods |
|
|---|---|
boolean |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
final float |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
final float |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
final float |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
int |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
final boolean |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
@NonNull String |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public constructors
BoundingArc
publicBoundingArc(float startAngle, float totalAngle, @Px float thickness)
Public methods
getStartAngle
public final float getStartAngle()The staring angle of the arc in degrees (0 degrees = 12 o'clock position).
getThickness
public final float getThickness()The thickness of the arc as a fraction of min(boundingRect.width, boundingRect.height).
getTotalAngle
public final float getTotalAngle()The total angle of the arc on degrees.
hitTest
public final booleanhitTest(@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 |
@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 |