draw_quad(BMAP*, VECTOR* vPos, VECTOR* vOffs, VECTOR* vSize, VECTOR* vScale, COLOR* vColor, var alpha, var angle)

Draws a 2D bitmap or color filled rectangle on the screen.

Parameters:

BMAP* - Bitmap to be drawn, or NULL for drawing a filled rectangle.
vPos - Screen XY position for the upper left corner of the rectangle.
vOffs - XY offset into the bitmap in pixels, or NULL for starting with the upper left corner of the bitmap.
vSize - XY size of the bitmap or rectangle in pixels, or NULL for drawing the whole bitmap.
vScale - XY scale factor, or NULL for a scale factor of 1. When the XY size is larger than the scaled bitmap, the image is tiled.
vColor - BGR color vector of the rectangle resp. color tint for the bitmap, or NULL for no color.
alpha - Opacity of the bitmap or rectangle, 0..100.
angle - Angle of the bitmap or rectangle, counterclockwise in degrees. The rectangle is rotated about its center.

Speed:

Fast

Remarks:

Example (lite-C):

void main() 
{
  while(1) {
    wait(1);
    var i;
    for(i=1; i<30; i++)
      draw_quad(NULL,
        vector((screen_size.x-screen_size.y)/2,screen_size.y/2,0),NULL,
        vector(screen_size.y,5,0),NULL,
        COLOR_RED,0.1*i*i,10*total_ticks+1.5*i);
  }
}

See also:

draw_text, draw_point3d, draw_line, draw_begin, bmap_rendertarget

► latest version online