Difference between revisions of "love.graphics.setLineStyle"

(Returns)
m
 
(One intermediate revision by one other user not shown)
Line 17: Line 17:
 
function love.load()
 
function love.load()
 
love.graphics.setLineStyle( "rough" )
 
love.graphics.setLineStyle( "rough" )
love.graphics.setLineWidth( 0.8 )
 
 
end
 
end
  
 
function love.draw()
 
function love.draw()
 +
love.graphics.line (0,0, 200, 50)
 
love.graphics.line (0,0, 200, 100)
 
love.graphics.line (0,0, 200, 100)
love.graphics.line (0,100, 200, 0)
+
love.graphics.line (0,0, 200, 150)
 +
love.graphics.line (0,0, 200, 200)
 +
love.graphics.line (0,0, 200, 250)
 
end
 
end
 
</source>
 
</source>

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