DrawLine (Harvest)

From OxeyeWiki

(Difference between revisions)
Jump to: navigation, search
(Created page with '{{HarvestMethod | harvest.drawLine(x1, y1, x2, y2[, r, g, b[, a]]) | Draws a GUI line from (x1, y1) to (x2, y2) with the given color. | {{MethodParam|x1|An integer|The starting x...')
 
(2 intermediate revisions not shown)
Line 5: Line 5:
Draws a GUI line from (x1, y1) to (x2, y2) with the given color.
Draws a GUI line from (x1, y1) to (x2, y2) with the given color.
|
|
-
{{MethodParam|x1|An integer|The starting x coordinate.}}
+
{{MethodParam|x1|Number|The starting x coordinate.}}
-
{{MethodParam|y1|An integer|The starting y coordinate.}}
+
{{MethodParam|y1|Number|The starting y coordinate.}}
-
{{MethodParam|x2|An integer|The ending x coordinate.}}
+
{{MethodParam|x2|Number|The ending x coordinate.}}
-
{{MethodParam|y2|An integer|The ending y coordinate.}}
+
{{MethodParam|y2|Number|The ending y coordinate.}}
-
{{MethodParam|a|An integer|The line color's alpha component, 0 is min and 255 is max.}}
+
{{MethodParam|r|Number|The line color's red component, 0 is min and 255 is max.}}
-
{{MethodParam|r|An integer|The line color's red component, 0 is min and 255 is max.}}
+
{{MethodParam|g|Number|The line color's green component, 0 is min and 255 is max.}}
-
{{MethodParam|g|An integer|The line color's green component, 0 is min and 255 is max.}}
+
{{MethodParam|b|Number|The line color's blue component, 0 is min and 255 is max.}}
-
{{MethodParam|b|An integer|The line color's blue component, 0 is min and 255 is max.}}
+
{{MethodParam|a|Number|The line color's alpha component, 0 is min and 255 is max.}}
|
|
Returns nothing.
Returns nothing.
Line 18: Line 18:
=== Example ===
=== Example ===
<pre>
<pre>
-
  harvest.drawLine(100, 115, 200, 115, 255, 255, 0, 255)
+
harvest.drawLine(100, 115, 200, 115, 255, 255, 0, 255)
</pre>
</pre>
 +
 +
=== Resources ===
 +
*[http://www.oxeyegames.com/forum/viewtopic.php?p=1523#p1523 Oxeye Game Studio Forum - Harvest Functions]

Latest revision as of 16:04, 2 December 2009

harvest.drawLine(x1, y1, x2, y2[, r, g, b[, a]])

Draws a GUI line from (x1, y1) to (x2, y2) with the given color.

Parameter Expected Type Description
x1 Number The starting x coordinate.
y1 Number The starting y coordinate.
x2 Number The ending x coordinate.
y2 Number The ending y coordinate.
r Number The line color's red component, 0 is min and 255 is max.
g Number The line color's green component, 0 is min and 255 is max.
b Number The line color's blue component, 0 is min and 255 is max.
a Number The line color's alpha component, 0 is min and 255 is max.
Returns

Returns nothing.

Harvest Library

Example

harvest.drawLine(100, 115, 200, 115, 255, 255, 0, 255)

Resources

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox