Language

RecordingCanvas.DrawVertices Method

Definition

Draw the array of vertices, interpreted as triangles (based on mode).

[Android.Runtime.Register("drawVertices", "(Landroid/graphics/Canvas$VertexMode;I[FI[FI[II[SIILandroid/graphics/Paint;)V", "", ApiSince=29)]
public override sealed void DrawVertices(Android.Graphics.Canvas.VertexMode mode, int vertexCount, float[] verts, int vertOffset, float[]? texs, int texOffset, int[]? colors, int colorOffset, short[]? indices, int indexOffset, int indexCount, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawVertices", "(Landroid/graphics/Canvas$VertexMode;I[FI[FI[II[SIILandroid/graphics/Paint;)V", "", ApiSince=29)>]
override this.DrawVertices : Android.Graphics.Canvas.VertexMode * int * single[] * int * single[] * int * int[] * int * int16[] * int * int * Android.Graphics.Paint -> unit

Parameters

vertexCount
Int32

The number of values in the vertices array (and corresponding texs and colors arrays if non-null). Each logical vertex is two values (x, y), vertexCount must be a multiple of 2.

verts
Single[]
vertOffset
Int32

Number of values in the verts to skip before drawing.

texs
Single[]
texOffset
Int32

Number of values in texs to skip before drawing.

colors
Int32[]
colorOffset
Int32

Number of values in colors to skip before drawing.

indices
Int16[]
indexOffset
Int32
indexCount
Int32

Number of entries in the indices array (if not null).

paint
Paint
Attributes

Remarks

Draw the array of vertices, interpreted as triangles (based on mode). The verts array is required, and specifies the x,y pairs for each vertex. If texs is non-null, then it is used to specify the coordinate in shader coordinates to use at each vertex (the paint must have a shader in this case). If there is no texs array, but there is a color array, then each color is interpolated across its corresponding triangle in a gradient. If both texs and colors arrays are present, then they behave as before, but the resulting color at each pixels is the result of multiplying the colors from the shader and the color-gradient together. The indices array is optional, but if it is present, then it is used to specify the index of each triangle, rather than just walking through the arrays in order. Note: antialiasing is not supported, therefore Paint.ANTI_ALIAS_FLAG is ignored.

Android reference for android.graphics.RecordingCanvas.drawVertices.

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