Added in API level 1

ArcShape


open class ArcShape : RectShape
kotlin.Any
   ↳ android.graphics.drawable.shapes.Shape
   ↳ android.graphics.drawable.shapes.RectShape
   ↳ android.graphics.drawable.shapes.ArcShape

Creates an arc shape. The arc shape starts at a specified angle and sweeps clockwise, drawing slices of pie.

The arc can be drawn to a Canvas with its own #draw(android.graphics.Canvas,android.graphics.Paint) method, but more graphical control is available if you instead pass the ArcShape to a android.graphics.drawable.ShapeDrawable.

Summary

Public constructors
ArcShape(startAngle: Float, sweepAngle: Float)

ArcShape constructor.

Public methods
open ArcShape

open Unit
draw(canvas: Canvas!, paint: Paint!)

open Boolean
equals(other: Any?)

open Unit
getOutline(outline: Outline)

Float

Float

open Int

Inherited functions

Public constructors

ArcShape

Added in API level 1
ArcShape(
    startAngle: Float,
    sweepAngle: Float)

ArcShape constructor.

Parameters
startAngle Float: the angle (in degrees) where the arc begins
sweepAngle Float: the sweep angle (in degrees). Anything equal to or greater than 360 results in a complete circle/oval.

Public methods

clone

Added in API level 1
open fun clone(): ArcShape
Return
ArcShape a clone of this instance.
Exceptions
java.lang.CloneNotSupportedException if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.

draw

Added in API level 1
open fun draw(
    canvas: Canvas!,
    paint: Paint!
): Unit
Parameters
canvas Canvas!: the Canvas within which this shape should be drawn
paint Paint!: the Paint object that defines this shape's characteristics

equals

Added in API level 1
open fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getOutline

Added in API level 21
open fun getOutline(outline: Outline): Unit
Parameters
outline Outline: the Outline to be populated with the result. Must be non-null.

getStartAngle

Added in API level 26
fun getStartAngle(): Float
Return
Float the angle (in degrees) where the arc begins

getSweepAngle

Added in API level 26
fun getSweepAngle(): Float
Return
Float the sweep angle (in degrees)

hashCode

Added in API level 1
open fun hashCode(): Int
Return
Int a hash code value for this object.