drawVertices abstract method
Draws a set of Vertices onto the canvas as one or more triangles.
The Paint.color property specifies the default color to use for the triangles.
The Paint.shader property, if set, overrides the color entirely, replacing it with the colors from the specified ImageShader, Gradient, or other shader.
The blendMode
parameter is used to control how the colors in the
vertices
are combined with the colors in the paint
. If there are no
colors specified in vertices
then the blendMode
has no effect. If
there are colors in the vertices
, then the color taken from the
Paint.shader or Paint.color in the paint
is blended with the colors
specified in the vertices
using the blendMode
parameter. For the
purposes of this blending, the colors from the paint
parameter are
considered the source, and the colors from the vertices
are considered
the destination. BlendMode.dst ignores the paint
and uses only the
colors of the vertices
; BlendMode.src ignores the colors of the
vertices
and uses only the colors in the paint
.
All parameters must not be null.
See also:
- Vertices.new, which creates a set of vertices to draw on the canvas.
- Vertices.raw, which creates the vertices using typed data lists rather than unencoded lists.
paint
, Image shaders can be used to draw images on a triangular mesh.
Implementation
void drawVertices(Vertices vertices, BlendMode blendMode, Paint paint);