DrawRectangle (Harvest)
From OxeyeWiki
(Difference between revisions)
| Line 5: | Line 5: | ||
Draws a filled rectangle at (x, y) with the specified size. | Draws a filled rectangle at (x, y) with the specified size. | ||
| | | | ||
| - | {{MethodParam|x| | + | {{MethodParam|x|Number|The starting x coordinate.}} |
| - | {{MethodParam|y| | + | {{MethodParam|y|Number|The starting y coordinate.}} |
| - | {{MethodParam|width| | + | {{MethodParam|width|Number|The width of the rectangle.}} |
| - | {{MethodParam|height| | + | {{MethodParam|height|Number|The height of the rectangle.}} |
| - | {{MethodParam| | + | {{MethodParam|r|Number|The rectangle color's red component, 0 is min and 255 is max.}} |
| - | {{MethodParam| | + | {{MethodParam|g|Number|The rectangle color's green component, 0 is min and 255 is max.}} |
| - | {{MethodParam| | + | {{MethodParam|b|Number|The rectangle color's blue component, 0 is min and 255 is max.}} |
| - | {{MethodParam| | + | {{MethodParam|a|Number|The rectangle color's alpha component, 0 is min and 255 is max.}} |
| | | | ||
Returns nothing. | Returns nothing. | ||
Revision as of 21:53, 1 December 2009
|
drawRectangle(x, y, width, height[, r, g, b[, a]]) | ||
|
Draws a filled rectangle at (x, y) with the specified size. | ||
| Parameter | Expected Type | Description |
| x | Number | The starting x coordinate. |
| y | Number | The starting y coordinate. |
| width | Number | The width of the rectangle. |
| height | Number | The height of the rectangle. |
| r | Number | The rectangle color's red component, 0 is min and 255 is max. |
| g | Number | The rectangle color's green component, 0 is min and 255 is max. |
| b | Number | The rectangle color's blue component, 0 is min and 255 is max. |
| a | Number | The rectangle color's alpha component, 0 is min and 255 is max. |
| Returns | ||
|
Returns nothing. | ||
Example
harvest.drawRectangle(100, 100, 200, 115, 0, 0, 0, 128)