Difference between revisions of "love.graphics.getPointStyle"

(Add an example, see also)
Line 1: Line 1:
Gets the current point style.
+
Gets the current [[love.graphics.setPoint|point]] style.
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
Line 9: Line 9:
 
=== Returns ===
 
=== Returns ===
 
{{param|PointStyle|style|The current point style.}}
 
{{param|PointStyle|style|The current point style.}}
 +
== Examples ==
 +
Toggle between [[love.graphics.setPoint|point styles]] with the help of [[love.graphics.setPointStyle]].
 +
<source lang="lua">
 +
if love.graphics.getPointStyle() == "rough" then
 +
  love.graphics.setPointStyle("smooth")
 +
else
 +
  love.graphics.setPointStyle("rough")
 +
end
 +
</source>
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 +
* [[love.graphics.point]]
 +
* [[love.graphics.setPointStyle]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Gets the current point style.}}
 
{{#set:Description=Gets the current point style.}}

Revision as of 17:42, 27 September 2011

Gets the current point style.

Function

Synopsis

style = love.graphics.getPointStyle( )

Arguments

None.

Returns

PointStyle style
The current point style.

Examples

Toggle between point styles with the help of love.graphics.setPointStyle.

if love.graphics.getPointStyle() == "rough" then
   love.graphics.setPointStyle("smooth")
else
   love.graphics.setPointStyle("rough")
end

See Also


Other Languages