Difference between revisions of "love.graphics.getLineWidth"

m
(Snippet for fixing a bug in 0.8.0 to model the expected behavior, as in 0.9.0.)
Line 9: Line 9:
 
=== Returns ===
 
=== Returns ===
 
{{param|number|width|The current line width.}}
 
{{param|number|width|The current line width.}}
 +
 +
'''Note:''' This function does not work in 0.8.0, but has been fixed in tip (0.9.0). Use the following snippet to circumvent this;
 +
 +
<source lang="lua">
 +
love.graphics._getLineWidth = love.graphics.getLineWidth
 +
love.graphics._setLineWidth = love.graphics.setLineWidth
 +
function love.graphics.getLineWidth() return love.graphics.varlinewidth or 1 end
 +
function love.graphics.setLineWidth(w) love.grapihcs.varlinewidth = w; return love.graphics._setLineWidth(w) end
 +
</source>
 +
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]

Revision as of 15:42, 7 October 2013

Gets the current line width.

Function

Synopsis

width = love.graphics.getLineWidth( )

Arguments

None.

Returns

number width
The current line width.

Note: This function does not work in 0.8.0, but has been fixed in tip (0.9.0). Use the following snippet to circumvent this;

love.graphics._getLineWidth = love.graphics.getLineWidth
love.graphics._setLineWidth = love.graphics.setLineWidth
function love.graphics.getLineWidth() return love.graphics.varlinewidth or 1 end
function love.graphics.setLineWidth(w) love.grapihcs.varlinewidth = w; return love.graphics._setLineWidth(w) end

See Also


Other Languages