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.
vColor - BGR color vector of the rectangle resp. color tint for the bitmap, or NULL for no color.
alpha - Transparency of the bitmap or rectangle, 0..100.
angle - angle of the bitmap or rectangle, counterclockwise in degrees.
Speed:
Fast
Remarks:
- The bitmap or rectangle is only visible in the next frame. For displaying it permanently, as if it were a panel, use a while ... wait(1) loop.
- Drawing a quad multiple times with small position, scale, or alpha increments generates a cool blur effect, especially when using a bitmap where the scene was rendered into.
-
The bmap_rendertarget function can be used to draw the quad into a bitmap.
Edition
A7.08
Example (lite-C):
draw_quad(pSplash.bmap,vector(20,10,0),NULL,NULL,vector(0.5,0.5,0),vector(255,100,100),70,-30);
See also:
draw_text, draw_point3d,
draw_line,
draw_begin, bmap_rendertarget
► latest
version online