b2dDrawQuad

Draws a four-cornered quad (filled or outline) from four points.

2D Overlay

Parameters & Returns

Parameters

x1 Int
y1 Int
x2 Int
y2 Int
x3 Int
y3 Int
x4 Int
y4 Int
fill Int

Returns

Void

Quick Summary

Draws a four-cornered quad (filled or outline) from four points.

Technical Exegesis...

Draws a quadrilateral through the four corner points in order (x1,y1)->(x2,y2)->(x3,y3)->(x4,y4). fill = 1 fills it, 0 draws the outline. A triangle is just a quad with two coincident points. Honours the current colour, alpha and b2dSetDepth - the building block for flat-shaded polygon rendering.

Example

Example.bam
b2dSetColor(200, 180, 60)
b2dDrawQuad(100,100, 200,120, 190,220, 90,200, 1)