From 8ea89aea335b65352a154098bbfd5327f1947df5 Mon Sep 17 00:00:00 2001
From: Josh Holtrop
ag.drawLine(r, g, b, x1, y1, x2, y2 [, width])
++This function tells the engine to draw a line to the screen. +The color of the line is given by (r, g, b). +The start and end coordinates of the line are (x1, y1) and (x2, y2). +width is an optional parameter and defaults to 1 if not +specified. +It controls the width of the line to be drawn. +drawLine() should normally be called from the +update_overlay event handler. +
+ag.drawObjects()
@@ -75,6 +89,31 @@ See setAutoDrawObjects for more information. + +ag.drawRect(r, g, b, width, height, x, y [, rot])
++This function draws a rectangle to the screen. +The color of the rectangle is given by (r, g, b). +The size is given by width and height. +The center of the rectangle is given by (x, y). +rot is an optional parameter that defaults to 0.0. +It specifies the rotation of the rectangle. +drawRect() should normally be called from the +update_overlay event handler. +
+ + +ag.drawText(message, r, g, b, ptsize, x, y)
++This function draws the text message, which should be +a string, to the screen at position (x, y), with color +specified by (r, g, b), and with font size ptsize. +It should normally be called from the update_overlay +event handler. +
+elapsed_msec = ag.elapsedTime()
@@ -107,6 +146,20 @@ will be executed and callbacks to other events may still be called. The engine should exit within one update step. + +ag.fillRect(r, g, b, width, height, x, y [, rot])
++This function draws a solid, filled rectangle to the screen. +The color of the rectangle is given by (r, g, b). +The size is given by width and height. +The center of the rectangle is given by (x, y). +rot is an optional parameter that defaults to 0.0. +It specifies the rotation of the rectangle. +fillRect() should normally be called from the +update_overlay event handler. +
+eye_x, eye_y, eye_z, center_x, center_y, center_z, up_x, up_y, up_z = ag.getCamera()
@@ -116,6 +169,15 @@ focus position (center coordinates), and up vector for the current camera settings. + +width, height = ag.getTextSize(message, ptsize)
++This function returns the width and height, in pixels, that +the text specified by message, which should be a string, +would take when drawn to the screen using font size ptsize. +
+width, height = ag.getScreenSize()