Moai SDK  1.5 revision 1 (MoaiEdition)
MOAIDraw Class Reference

Inherits MOAIGlobalClass< TYPE, SUPER >.

List of all members.

Function List

  drawBoxOutline
  drawCircle
  drawEllipse
  drawLine
  drawPoints
  drawRay
  drawRect
  fillCircle
  fillEllipse
  fillFan
  fillRect
  drawTexture
  drawText

Function Documentation

Draw a box outline.


function drawBoxOutline ( number x0, number y0, number z0, number x1, number y1, number z1 )
Parameters:
x0 ( number )
y0 ( number )
z0 ( number )
x1 ( number )
y1 ( number )
z1 ( number )
Returns:
nil

Draw a circle.


function drawCircle ( number x, number y, number r, number steps )
Parameters:
x ( number )
y ( number )
r ( number )
steps ( number )
Returns:
nil

Draw an ellipse.


function drawEllipse ( number x, number y, number xRad, number yRad, number steps )
Parameters:
x ( number )
y ( number )
xRad ( number )
yRad ( number )
steps ( number )
Returns:
nil

Draw a line.


function drawLine ( ... )
Parameters:
( ... ) vertices List of vertices (x, y) or an array of vertices { x0, y0, x1, y1, ... , xn, yn }
Returns:
nil

Draw a list of points.


function drawPoints ( ... )
Parameters:
( ... ) vertices List of vertices (x, y) or an array of vertices { x0, y0, x1, y1, ... , xn, yn }
Returns:
nil

Draw a ray.


function drawRay ( number x, number y, number dx, number dy )
Parameters:
x ( number )
y ( number )
dx ( number )
dy ( number )
Returns:
nil

Draw a rectangle.


function drawRect ( number x0, number y0, number x1, number y1 )
Parameters:
x0 ( number )
y0 ( number )
x1 ( number )
y1 ( number )
Returns:
nil

Draws a string.


function drawText ( MOAIFont font, number size, string text, number x, number y, number scale, number shadowOffsetX, number shadowOffsetY )
Parameters:
font ( MOAIFont )
size ( number ) Font size
text ( string )
x ( number ) Left position
y ( number ) Top position
scale ( number )
shadowOffsetX ( number )
shadowOffsetY ( number )
Returns:
nil

Draw a filled rectangle.


function drawTexture ( number x0, number y0, number x1, number y1, MOAITexture texture )
Parameters:
x0 ( number )
y0 ( number )
x1 ( number )
y1 ( number )
texture ( MOAITexture )
Returns:
nil

Draw a filled circle.


function fillCircle ( number x, number y, number r, number steps )
Parameters:
x ( number )
y ( number )
r ( number )
steps ( number )
Returns:
nil

Draw a filled ellipse.


function fillEllipse ( number x, number y, number xRad, number yRad, number steps )
Parameters:
x ( number )
y ( number )
xRad ( number )
yRad ( number )
steps ( number )
Returns:
nil

Draw a filled fan.


function fillFan ( ... )
Parameters:
( ... ) vertices List of vertices (x, y) or an array of vertices { x0, y0, x1, y1, ... , xn, yn }
Returns:
nil

Draw a filled rectangle.


function fillRect ( number x0, number y0, number x1, number y1 )
Parameters:
x0 ( number )
y0 ( number )
x1 ( number )
y1 ( number )
Returns:
nil