The Drawing object

Sub ResetMatrix()

Sub Scaling(ByVal x As Single, ByVal y As Single, ByVal z As Single)

Sub translate(ByVal x As Single, ByVal y As Single, ByVal z As Single)
Sub SetAntialiasing(aa As Boolean)

Sub PushMatrix()

Sub PopMatrix()

Sub Rectangle(ByVal X1 As Single, ByVal Y1 As Single, ByVal x2 As Single, ByVal y2 As Single)
'draw a 2d rectangle in 3d space

Sub RoundedRectangle(ByVal X1 As Single, ByVal Y1 As Single, ByVal x2 As Single, ByVal y2 As Single, ByVal Roundness As Single)

Sub RoundedRectangle3D(ByVal X1 As Single, ByVal Y1 As Single, ByVal x2 As Single, ByVal y2 As Single, ByVal z1 As Single, ByVal
Roundness As Single)

Sub Rectangle3D(ByVal X1 As Single, ByVal Y1 As Single, ByVal x2 As Single, ByVal y2 As Single, ByVal z1 As Single)
'draw a 2d rectangle in 3d space

Sub Ellipse(ByVal X1 As Single, ByVal Y1 As Single, ByVal r As Single)

Sub Ellipse3D(ByVal X1 As Single, ByVal Y1 As Single, ByVal z1 As Single, ByVal r As Single)

Sub PieSegment(ByVal x1 As Single, ByVal y1 As Single, ByVal r As Single, ByVal startangle As Single, ByVal sweepangle As Single)

Sub Line2d(ByVal X1 As Single, ByVal Y1 As Single, ByVal x2 As Single, ByVal y2 As Single)

Sub Line3D(ByVal X1 As Single, ByVal Y1 As Single, ByVal z1 As Single, ByVal x2 As Single, ByVal y2 As Single, ByVal z2 As Single)
'use a 4 point polygon to draw this, since it can be 3d, and on a matrix.
If gfx = 0 Then Exit Sub

Sub DrawString(ByVal str As String, ByVal Size As Single, ByVal fontfamily As String, ByVal X1 As Single, ByVal Y1 As Single)

Sub DrawString3D(ByVal str As String, ByVal Size As Single, ByVal fontfamily As String, ByVal X1 As Single, ByVal Y1 As Single, ByVal
z1 As Single, ByVal x2 As Single, ByVal y2 As Single)

Sub Concatmatrix(m As VBMatrix)

Sub SetMatrix(m As VBMatrix)

Sub SetFillColor(C As VBColor)

Sub SetFillColorRGBA(ByVal r As Long, ByVal g As Long, ByVal b As Long, ByVal a As Long)

Sub SetStrokeColor(C As VBColor)

Sub SetStrokeColorRGBA(ByVal r As Long, ByVal g As Long, ByVal b As Long, ByVal a As Long)

Sub SetDash(DashStyle As Long)

Sub InitCamera()

Sub BeginRender(ByVal Scalewidth_ As Single, ByVal Scaleheight_ As Single) 'usually a form or picturebox
'Rendering does not use the HDC.  It renders only triangles to the main image, via a set of intermediat buffers, such as z, uv, vertex, and
etc.
'Do not use any other drawing commands with Begin/End render.  It is for triangles.

Sub BeginDraw3D(ByVal hdc As Long, ByVal

Sub BeginLinearGradient(ByVal x1 As Single, ByVal y1 As Single, ByVal x2 As Single, ByVal y2 As Single, Color1 As VBColor, color2 As
VBColor)

Sub AddStop(ByVal Color As VBColor, ByVal position As Single) 'used within BeginLinearGradient and EndLinearGradient

Sub EndLinearGradient

Sub Clear(w As Long, h As Long, r As Long, g As Long, b As Long)

Sub VectorEllipse(ByVal x As Single, ByVal y As Single, ByVal rx As Single, ByVal ry As Single, Optional Stp As Long = 1)

'draw an ellipse from a vector so it will be able to scale/rotate/translate

Sub BeginCurve()

Sub BeginShape()

Sub vertex(ByVal x As Single, ByVal y As Single, Optional ByVal z As Single = 0) 'used within BeginCurve and BeginCurve

Sub vertex_color(ByVal r As Single, ByVal g As Single, ByVal b As Single) 'used within BeginCurve and BeginShape

Sub EndCurve(Optional ByVal Closed As Boolean = True)

Sub EndShape()




Drawing class example:

function main()

'function that draws random circles using the drawing class.  Always start with a main() function

dogwaffle.dog_saveundo "Render circles"

w=dogwaffle.dog_bufferwidth
h=dogwaffle.dog_bufferheight

drawing.BeginDraw

drawing.setantialiasing true
drawing.Usefill true
drawing.setstrokesize 5

for n=1 to 100
drawing.setstrokecolorRGBA rnd*255, rnd*255, rnd*255, 255
drawing.setfillcolorRGBA rnd*255, rnd*255, rnd*255, 255
drawing.ellipse w*rnd, h*rnd, rnd*100
next

drawing.enddraw

dogwaffle.dog_refresh

end function