共用方式為


Canvas.DrawArc Method

Definition

Overloads

DrawArc(RectF, Single, Single, Boolean, Paint)

Draw the specified arc, which will be scaled to fit inside the specified oval.

DrawArc(Single, Single, Single, Single, Single, Single, Boolean, Paint)

Draw the specified arc, which will be scaled to fit inside the specified oval.

DrawArc(RectF, Single, Single, Boolean, Paint)

Draw the specified arc, which will be scaled to fit inside the specified oval.

[Android.Runtime.Register("drawArc", "(Landroid/graphics/RectF;FFZLandroid/graphics/Paint;)V", "GetDrawArc_Landroid_graphics_RectF_FFZLandroid_graphics_Paint_Handler")]
public virtual void DrawArc (Android.Graphics.RectF oval, float startAngle, float sweepAngle, bool useCenter, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawArc", "(Landroid/graphics/RectF;FFZLandroid/graphics/Paint;)V", "GetDrawArc_Landroid_graphics_RectF_FFZLandroid_graphics_Paint_Handler")>]
abstract member DrawArc : Android.Graphics.RectF * single * single * bool * Android.Graphics.Paint -> unit
override this.DrawArc : Android.Graphics.RectF * single * single * bool * Android.Graphics.Paint -> unit

Parameters

oval
RectF

The bounds of oval used to define the shape and size of the arc

startAngle
Single

Starting angle (in degrees) where the arc begins

sweepAngle
Single

Sweep angle (in degrees) measured clockwise

useCenter
Boolean

If true, include the center of the oval in the arc, and close it if it is being stroked. This will draw a wedge

paint
Paint

The paint used to draw the arc

Attributes

Remarks

Draw the specified arc, which will be scaled to fit inside the specified oval.

If the start angle is negative or >= 360, the start angle is treated as start angle modulo 360.

If the sweep angle is >= 360, then the oval is drawn completely. Note that this differs slightly from SkPath::arcTo, which treats the sweep angle modulo 360. If the sweep angle is negative, the sweep angle is treated as sweep angle modulo 360

The arc is drawn clockwise. An angle of 0 degrees correspond to the geometric angle of 0 degrees (3 o'clock on a watch.)

Java documentation for android.graphics.Canvas.drawArc(android.graphics.RectF, float, float, boolean, android.graphics.Paint).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

DrawArc(Single, Single, Single, Single, Single, Single, Boolean, Paint)

Draw the specified arc, which will be scaled to fit inside the specified oval.

[Android.Runtime.Register("drawArc", "(FFFFFFZLandroid/graphics/Paint;)V", "GetDrawArc_FFFFFFZLandroid_graphics_Paint_Handler")]
public virtual void DrawArc (float left, float top, float right, float bottom, float startAngle, float sweepAngle, bool useCenter, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawArc", "(FFFFFFZLandroid/graphics/Paint;)V", "GetDrawArc_FFFFFFZLandroid_graphics_Paint_Handler")>]
abstract member DrawArc : single * single * single * single * single * single * bool * Android.Graphics.Paint -> unit
override this.DrawArc : single * single * single * single * single * single * bool * Android.Graphics.Paint -> unit

Parameters

left
Single
top
Single
right
Single
bottom
Single
startAngle
Single

Starting angle (in degrees) where the arc begins

sweepAngle
Single

Sweep angle (in degrees) measured clockwise

useCenter
Boolean

If true, include the center of the oval in the arc, and close it if it is being stroked. This will draw a wedge

paint
Paint

The paint used to draw the arc

Attributes

Remarks

Draw the specified arc, which will be scaled to fit inside the specified oval.

If the start angle is negative or >= 360, the start angle is treated as start angle modulo 360.

If the sweep angle is >= 360, then the oval is drawn completely. Note that this differs slightly from SkPath::arcTo, which treats the sweep angle modulo 360. If the sweep angle is negative, the sweep angle is treated as sweep angle modulo 360

The arc is drawn clockwise. An angle of 0 degrees correspond to the geometric angle of 0 degrees (3 o'clock on a watch.)

Java documentation for android.graphics.Canvas.drawArc(float, float, float, float, float, float, boolean, android.graphics.Paint).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to