Canvas.DrawLine(Single, Single, Single, Single, Paint) Method

Definition

Draw a line segment with the specified start and stop x,y coordinates, using the specified paint.

[Android.Runtime.Register("drawLine", "(FFFFLandroid/graphics/Paint;)V", "GetDrawLine_FFFFLandroid_graphics_Paint_Handler")]
public virtual void DrawLine (float startX, float startY, float stopX, float stopY, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawLine", "(FFFFLandroid/graphics/Paint;)V", "GetDrawLine_FFFFLandroid_graphics_Paint_Handler")>]
abstract member DrawLine : single * single * single * single * Android.Graphics.Paint -> unit
override this.DrawLine : single * single * single * single * Android.Graphics.Paint -> unit

Parameters

startX
Single

The x-coordinate of the start point of the line

startY
Single

The y-coordinate of the start point of the line

stopX
Single
stopY
Single
paint
Paint

The paint used to draw the line

Attributes

Remarks

Draw a line segment with the specified start and stop x,y coordinates, using the specified paint.

Note that since a line is always "framed", the Style is ignored in the paint.

Degenerate lines (length is 0) will not be drawn.

Java documentation for android.graphics.Canvas.drawLine(float, float, float, float, 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