All Functions Modules Pages
draw

Functions

NIL draw.line (NUMBER x1, NUMBER y1, NUMBER x2, NUMBER y2, COLOR myColor)
 Draws a straight line between points x1,y1 and x2,y2. More...
 
NIL draw.gradline (NUMBER x1, NUMBER y1, NUMBER x2, NUMBER y2, COLOR c1, COLOR c2)
 Draw a straight line between points x1, y1 and x2, y2 with gradient effect. More...
 
NIL draw.rect (NUMBER x, NUMBER y, NUMBER w, NUMBER h, COLOR myColor)
 Draws an unfilled rectangle. More...
 
NIL draw.fillrect (NUMBER x, NUMBER y, NUMBER w, NUMBER h, COLOR myColor)
 Draws a filled rectangle. More...
 
NIL draw.gradrect (NUMBER x, NUMBER y, NUMBER w, NUMBER h, COLOR c1, COLOR c2, COLOR c3, COLOR c4)
 Draws a filled rectangle with custom gradient. More...
 
NIL draw.gradrect (NUMBER x, NUMBER y, NUMBER w, NUMBER h, COLOR c1, COLOR c2, NUMBER mode)
 Draw a rectangle filled with a predefined gradient (5 possibilities). More...
 
NIL draw.filltriangle (NUMBER x1, NUMBER y1, NUMBER x2, NUMBER y2, NUMBER x3, NUMBER y3, COLOR myColor)
 Draws a filled triangle. More...
 
NIL draw.gradtriangle (NUMBER x1, NUMBER y1, NUMBER x2, NUMBER y2, NUMBER x3, NUMBER y3, COLOR c1, COLOR c2, COLOR c3)
 Draws a filled triangle with a gradient effect.. More...
 
NIL draw.circle (NUMBER x, NUMBER y, NUMBER radius, COLOR myColor, NUMBER sections)
 Draw a circle unfilled. More...
 
NIL draw.gradcircle (NUMBER x, NUMBER y, NUMBER radius, COLOR c1, COLOR c2, NUMBER sections)
 Draws a filled circle with gradient effect. More...
 
NIL draw.circlesection (NUMBER x, NUMBER y, NUMBER radius, COLOR c, NUMBER mode)
 Draw a circle section. More...
 
NIL draw.gradarc (NUMBER x, NUMBER y, NUMBER radius, COLOR c1, COLOR c2, NUMBER gradinitial, NUMBER gradfinal, NUMBER sections)
 Draw an arc with gradient effect. More...
 
NIL draw.framearc (NUMBER x, NUMBER y, NUMBER radius, COLOR c, NUMBER gradinitial, NUMBER gradfinal, NUMBER sections)
 Draw an arc with edge and gradient effect. More...
 

Detailed Description

Drawing basic forms.

Function Documentation

NIL draw.line ( NUMBER  x1,
NUMBER  y1,
NUMBER  x2,
NUMBER  y2,
COLOR  myColor 
)

Draws a straight line between points x1,y1 and x2,y2.

Parameters
x1Coordinate X of the initial point.
y1coordinate Y of the initial point.
x2Coordinate X of the final point.
y2Coordinate Y of the initial point.
myColorA color for draw the line.
Returns
Nothing.
NIL draw.gradline ( NUMBER  x1,
NUMBER  y1,
NUMBER  x2,
NUMBER  y2,
COLOR  c1,
COLOR  c2 
)

Draw a straight line between points x1, y1 and x2, y2 with gradient effect.

Parameters
x1Coordinate X of the initial point.
y1coordinate Y of the initial point.
x2Coordinate X of the final point.
y2Coordinate Y of the initial point.
c1First color of the gradient.
c2Second color of the gradient.
Returns
Nada.
NIL draw.rect ( NUMBER  x,
NUMBER  y,
NUMBER  w,
NUMBER  h,
COLOR  myColor 
)

Draws an unfilled rectangle.

Parameters
xCoordinate X of the top left corner.
yCoordinate Y of the top left corner.
wWidth.
hHeight.
myColorA color for draw the rectangle.
Returns
Nothing.
NIL draw.fillrect ( NUMBER  x,
NUMBER  y,
NUMBER  w,
NUMBER  h,
COLOR  myColor 
)

Draws a filled rectangle.

Parameters
xCoordinate X of the top left corner.
yCoordinate Y of the top left corner.
wWidth.
hHeight.
myColorA color for draw and fill the rectangle.
Returns
Nothing.
NIL draw.gradrect ( NUMBER  x,
NUMBER  y,
NUMBER  w,
NUMBER  h,
COLOR  c1,
COLOR  c2,
COLOR  c3,
COLOR  c4 
)

Draws a filled rectangle with custom gradient.

Parameters
xCoordinate X of the top left corner.
yCoordinate Y of the top left corner.
wWidth.
hHeight.
c1Top left corner color.
c2Top right corner color.
c3Bottom left corner color.
c4Bottom right corner color.
Returns
Nothing.
NIL draw.gradrect ( NUMBER  x,
NUMBER  y,
NUMBER  w,
NUMBER  h,
COLOR  c1,
COLOR  c2,
NUMBER  mode 
)

Draw a rectangle filled with a predefined gradient (5 possibilities).

Parameters
xCoordinate X of the top left corner.
yCoordinate Y of the top left corner.
wWidth.
hHeight.
c1First color of the gradient.
c2Second color of the gradient.
modeGradient type, some of those constants (numeric value in parenthesis):
  • __HORIZONTAL (0)
  • __VERTICAL (1)
  • __DIAGONAL (2)
  • __DOUBLEHOR (3)
  • __DOUBLEVER (4)
Returns
Nothing.
NIL draw.filltriangle ( NUMBER  x1,
NUMBER  y1,
NUMBER  x2,
NUMBER  y2,
NUMBER  x3,
NUMBER  y3,
COLOR  myColor 
)

Draws a filled triangle.

Parameters
x1Coordinate X of point 1 of the triangle.
y1Coordinate Y of point 1 of the triangle.
x2Coordinate X of point 2 of the triangle.
y2Coordinate Y of point 2 of the triangle.
x3Coordinate X of point 3 of the triangle.
y3Coordinate Y of point 3 of the triangle.
myColorA color to draw and fill the triangle.
Returns
Nothing.
NIL draw.gradtriangle ( NUMBER  x1,
NUMBER  y1,
NUMBER  x2,
NUMBER  y2,
NUMBER  x3,
NUMBER  y3,
COLOR  c1,
COLOR  c2,
COLOR  c3 
)

Draws a filled triangle with a gradient effect..

Parameters
x1Coordinate X of point 1 of the triangle.
y1Coordinate Y of point 1 of the triangle.
x2Coordinate X of point 2 of the triangle.
y2Coordinate Y of point 2 of the triangle.
x3Coordinate X of point 3 of the triangle.
y3Coordinate Y of point 3 of the triangle.
c1First color of the gradient.
c2Second color of the gradient.
c3Third color of the gradient.
Returns
Nothing.
NIL draw.circle ( NUMBER  x,
NUMBER  y,
NUMBER  radius,
COLOR  myColor,
NUMBER  sections 
)

Draw a circle unfilled.

Parameters
xCoordinate X of circle origin.
yCoordinate Y of circle origin.
radiusCircle radius.
myColorA color to draw the circle.
sectionsNumber of triangles used to estimate a circle, a common value is 30.
Returns
Nothing.
NIL draw.gradcircle ( NUMBER  x,
NUMBER  y,
NUMBER  radius,
COLOR  c1,
COLOR  c2,
NUMBER  sections 
)

Draws a filled circle with gradient effect.

Parameters
xCoordinate X of circle origin.
yCoordinate Y of circle origin.
radiusCircle radius.
c1First color of the gradient.
c2Second color of the gradient.
sectionsNumber of triangles used to estimate a circle, a common value is 30.
Returns
Nothing.
NIL draw.circlesection ( NUMBER  x,
NUMBER  y,
NUMBER  radius,
COLOR  c,
NUMBER  mode 
)

Draw a circle section.

Parameters
xCoordinate X of circle origin.
yCoordinate Y of circle origin.
radiusCircle radius.
cA color to draw the circle section.
modenumber indicating the circle section to draw:
  • 1 Draw the upper-left circle section.
  • 2 Draw the upper-right circle section.
  • 3 Draw the botton-left circle section.
  • 4 Draw the bottom-right circle section.
Returns
Nothing.
NIL draw.gradarc ( NUMBER  x,
NUMBER  y,
NUMBER  radius,
COLOR  c1,
COLOR  c2,
NUMBER  gradinitial,
NUMBER  gradfinal,
NUMBER  sections 
)

Draw an arc with gradient effect.

Parameters
xCoordinate X of circle origin.
yCoordinate Y of circle origin.
radiusCircle radius.
c1First color of the gradient.
c2Second color of the gradient.
gradinitialInitial degrees to draw an arc.
gradfinalFinal degrees to draw an arc.
sectionsNumber of triangles used to estimate a circle, a common value is 30.
Returns
Nothing.
NIL draw.framearc ( NUMBER  x,
NUMBER  y,
NUMBER  radius,
COLOR  c,
NUMBER  gradinitial,
NUMBER  gradfinal,
NUMBER  sections 
)

Draw an arc with edge and gradient effect.

Parameters
xCoordinate X of circle origin.
yCoordinate Y of circle origin.
radiusCircle radius.
cColor of the gradient.
gradinitialInitial degrees to draw an arc.
gradfinalFinal degrees to draw an arc.
sectionsNumber of triangles used to estimate a circle, a common value is 30.
Returns
Nothing.