共用方式為


Canvas.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", "GetDrawVertices_Landroid_graphics_Canvas_VertexMode_IarrayFIarrayFIarrayIIarraySIILandroid_graphics_Paint_Handler")]
public virtual 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", "GetDrawVertices_Landroid_graphics_Canvas_VertexMode_IarrayFIarrayFIarrayIIarraySIILandroid_graphics_Paint_Handler")>]
abstract member DrawVertices : Android.Graphics.Canvas.VertexMode * int * single[] * int * single[] * int * int[] * int * int16[] * int * int * Android.Graphics.Paint -> unit
override this.DrawVertices : Android.Graphics.Canvas.VertexMode * int * single[] * int * single[] * int * int[] * int * int16[] * int * int * Android.Graphics.Paint -> unit

Parameters

mode
Canvas.VertexMode

How to interpret the array of vertices

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[]

Array of vertices for the mesh

vertOffset
Int32

Number of values in the verts to skip before drawing.

texs
Single[]

May be null. If not null, specifies the coordinates to sample into the current shader (e.g. bitmap tile or gradient)

texOffset
Int32

Number of values in texs to skip before drawing.

colors
Int32[]

May be null. If not null, specifies a color for each vertex, to be interpolated across the triangle.

colorOffset
Int32

Number of values in colors to skip before drawing.

indices
Int16[]

If not null, array of indices to reference into the vertex (texs, colors) array.

indexOffset
Int32
indexCount
Int32

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

paint
Paint

Specifies the shader to use if the texs array is non-null.

Attributes

Remarks

Java documentation for android.graphics.Canvas.drawVertices(android.graphics.VertexMode, int, float[], int, float[], int, int[], int, short[], int, int, 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