Oval: Difference between revisions
Jump to navigation
Jump to search
imported>Ninjatintin No edit summary |
imported>Ninjatintin |
||
| Line 1: | Line 1: | ||
===< | {{ApiReference | ||
|name=oval | |||
|shortdesc=Draws an empty oval shape. | |||
|x0||The x coordinate of the upper left corner. | |||
|y0||The y coordinate of the upper left corner. | |||
|x1||The x coordinate of the lower right corner. | |||
|y1||The y coordinate of the lower right corner. | |||
|col|optional|The color of the oval's border. If omitted, the color from the [[DrawState|draw state]] is used. | |||
}} | |||
==Examples== | |||
[[File:Oval.png|thumb|220x220px]] | |||
<syntaxhighlight lang="lua" start="0"> | |||
-- draw a red oval border of a wider shape | |||
cls(0) | |||
function _draw() | |||
oval(10,30,100,100,8) | |||
end | |||
</syntaxhighlight> | |||
== See also == | |||
* [[Graphics]] | |||
* [[DrawState|Draw state]] | |||
* [[Circ|<code>circ()</code>]] | |||
[[Category:Reference]] | |||
[[Category:API]] | |||
Revision as of 21:20, 25 June 2021
oval( x0, y0, x1, y1, [col] )
- Draws an empty oval shape.
- x0
-
- The x coordinate of the upper left corner.
- y0
-
- The y coordinate of the upper left corner.
- x1
-
- The x coordinate of the lower right corner.
- y1
-
- The y coordinate of the lower right corner.
- col
-
- The color of the oval's border. If omitted, the color from the draw state is used.
Examples
-- draw a red oval border of a wider shape
cls(0)
function _draw()
oval(10,30,100,100,8)
end