Difference between revisions of "love.graphics.setLineStyle"

m (minor fixed. (Since 000 -> 032))
m
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{newin|[[0.3.2]]|032|type=function}}
 
Sets the line style.
 
Sets the line style.
 
== Function ==
 
== Function ==
Line 9: Line 10:
 
=== Returns ===
 
=== Returns ===
 
Nothing.
 
Nothing.
 +
 +
== Example ==
 +
Draw lines
 +
 +
<source lang="lua">
 +
function love.load()
 +
love.graphics.setLineStyle( "rough" )
 +
end
 +
 +
function love.draw()
 +
love.graphics.line (0,0, 200, 50)
 +
love.graphics.line (0,0, 200, 100)
 +
love.graphics.line (0,0, 200, 150)
 +
love.graphics.line (0,0, 200, 200)
 +
love.graphics.line (0,0, 200, 250)
 +
end
 +
</source>
 +
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
Line 15: Line 34:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Sets the line style.}}
 
{{#set:Description=Sets the line style.}}
{{#set:Since=032}}
 
{{#set:PrettySince=0.3.2}}
 
 
{{#set:Sub-Category=State}}
 
{{#set:Sub-Category=State}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.setLineStyle}}
 
{{i18n|love.graphics.setLineStyle}}

Latest revision as of 13:59, 15 September 2024

Available since LÖVE 0.3.2
This function is not supported in earlier versions.

Sets the line style.

Function

Synopsis

love.graphics.setLineStyle( style )

Arguments

LineStyle style
The LineStyle to use. Line styles include smooth and rough.

Returns

Nothing.

Example

Draw lines

function love.load()
	love.graphics.setLineStyle( "rough" )
end

function love.draw()
	love.graphics.line (0,0, 200, 50)
	love.graphics.line (0,0, 200, 100)
	love.graphics.line (0,0, 200, 150)
	love.graphics.line (0,0, 200, 200)
	love.graphics.line (0,0, 200, 250)
end

See Also


Other Languages