Skip to content

Mojo graphics canvas drawprimitives

mojo:mojo.graphics.Canvas.DrawPrimitives

Method DrawPrimitives:Void( order:Int,count:Int,vertices:Float Ptr,verticesPitch:Int,texCoords:Float Ptr,texCoordsPitch:Int,colors:UInt Ptr,colorsPitch:Int,image:Image,indices:Int Ptr )#

Draws a sequence of primtives.

Draws a sequence of convex primtives using the current Color, BlendMode and Matrix.

Parameters
order order The type of primitive: 1=points, 2=lines, 3=triangles, 4=quads, >4=n-gons.
count count The number of primitives to draw.
vertices vertices Pointer to the first vertex x,y pair.
verticesPitch verticesPitch Number of bytes from one vertex x,y pair to the next. Set to 8 for 'tightly packed' vertices.
texCoords texCoords Pointer to the first texCoord s,t pair. This can be null.
texCoordsPitch texCoordsPitch Number of bytes from one texCoord s,y to the next. Set to 8 for 'tightly packed' texCoords.
colors colors Pointer to the first RGBA uint color value. This can be null.
colorsPitch colorsPitch Number of bytes from one RGBA color to the next. Set to 4 for 'tightly packed' colors.
image image Source image for rendering. This can be null.
indices indices Pointer to sequence of integer indices for indexed drawing. This can by null for non-indexed drawing.