DrawRectangle (Harvest)

From OxeyeWiki

(Difference between revisions)
Jump to: navigation, search
 
(2 intermediate revisions not shown)
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|An integer|The starting x coordinate.}}
+
{{MethodParam|x|Number|The starting x coordinate.}}
-
{{MethodParam|y|An integer|The starting y coordinate.}}
+
{{MethodParam|y|Number|The starting y coordinate.}}
-
{{MethodParam|width|An integer|The width of the rectangle.}}
+
{{MethodParam|width|Number|The width of the rectangle.}}
-
{{MethodParam|height|An integer|The height of the rectangle.}}
+
{{MethodParam|height|Number|The height of the rectangle.}}
-
{{MethodParam|a|An integer|The rectangle color's alpha component, 0 is min and 255 is max.}}
+
{{MethodParam|r|Number|The rectangle color's red component, 0 is min and 255 is max.}}
-
{{MethodParam|r|An integer|The rectangle color's red component, 0 is min and 255 is max.}}
+
{{MethodParam|g|Number|The rectangle color's green component, 0 is min and 255 is max.}}
-
{{MethodParam|g|An integer|The rectangle color's green component, 0 is min and 255 is max.}}
+
{{MethodParam|b|Number|The rectangle color's blue component, 0 is min and 255 is max.}}
-
{{MethodParam|b|An integer|The rectangle color's blue component, 0 is min and 255 is max.}}
+
{{MethodParam|a|Number|The rectangle color's alpha component, 0 is min and 255 is max.}}
|
|
Returns nothing.
Returns nothing.
Line 18: Line 18:
=== Example ===
=== Example ===
<pre>
<pre>
-
  harvest.drawRectangle(100, 100, 200, 115, 0, 0, 0, 128)
+
harvest.drawRectangle(100, 100, 200, 115, 0, 0, 0, 128)
</pre>
</pre>
 +
 +
=== Resources ===
 +
*[http://www.oxeyegames.com/forum/viewtopic.php?p=1523#p1523 Oxeye Game Studio Forum - Harvest Functions]

Latest revision as of 16:05, 2 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.

Harvest Library

Example

harvest.drawRectangle(100, 100, 200, 115, 0, 0, 0, 128)

Resources

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox