RenderRectangle
From OxeyeWiki
video.renderRectangle(x, y, width, height, a, r, g, b) | ||
This method renders a rectangle on the screen with corners at (x, y) and (x + width - 1, y + height - 1), using an ARGB color. | ||
Parameter | Expected Type | Description |
x | An integer | The left edge of the rectangle, inclusive. |
y | An integer | The top edge of the rectangle, inclusive. |
width | An integer | The width of the rectangle. |
height | An integer | The height of the rectangle. |
a | An integer | The alpha component of the color, with 0 as transparent and 255 as opaque. |
r | An integer | The red component of the color. |
g | An integer | The green component of the color. |
b | An integer | The blue component of the color. |
Returns | ||
Returns nothing. |
Example
-- fill screen with blue local w,h = video.getScreenSize() video.renderRectangle(0, 0, w, h, 255, 0, 0, 128)