Språk

RecordingCanvas.DrawLines Method

Definition

Overloads

Name Description
DrawLines(Single[], Paint)

Draws independent line segments from the complete coordinate array.

DrawLines(Single[], Int32, Int32, Paint)

Draw a series of lines.

DrawLines(Single[], Paint)

Draws independent line segments from the complete coordinate array.

[Android.Runtime.Register("drawLines", "([FLandroid/graphics/Paint;)V", "", ApiSince=29)]
public override sealed void DrawLines(float[] pts, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawLines", "([FLandroid/graphics/Paint;)V", "", ApiSince=29)>]
override this.DrawLines : single[] * Android.Graphics.Paint -> unit

Parameters

pts
Single[]

Line endpoints stored as x0, y0, x1, y1 groups.

paint
Paint

The paint supplying line color, stroke width, and endpoint cap settings.

Attributes

Remarks

The full array is used. Consecutive groups of four floats define independent line segments; this overload does not join them into a continuous path.

Applies to

DrawLines(Single[], Int32, Int32, Paint)

Draw a series of lines.

[Android.Runtime.Register("drawLines", "([FIILandroid/graphics/Paint;)V", "", ApiSince=29)]
public override sealed void DrawLines(float[] pts, int offset, int count, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawLines", "([FIILandroid/graphics/Paint;)V", "", ApiSince=29)>]
override this.DrawLines : single[] * int * int * Android.Graphics.Paint -> unit

Parameters

pts
Single[]

The coordinate array containing x0, y0, x1, y1 groups for the selected lines.

offset
Int32

Number of values in the array to skip before drawing.

count
Int32

The number of values in the array to process, after skipping "offset" of them. Since each line uses 4 values, the number of "lines" that are drawn is really (count >> 2).

paint
Paint

The paint supplying line color, stroke width, and endpoint cap settings.

Attributes

Remarks

Draw a series of lines. Each line is taken from 4 consecutive values in the pts array. Thus to draw 1 line, the array must contain at least 4 values. This is logically the same as drawing the array as follows: drawLine(pts[0], pts[1], pts[2], pts[3]) followed by drawLine(pts[4], pts[5], pts[6], pts[7]) and so on.

Android reference for android.graphics.RecordingCanvas.drawLines.

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