Difference between revisions of "love.graphics.setLineJoin"
(link to LineJoin constants) |
(Added example.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Sets the line join style. See [[LineJoin]] for the possible options. | Sets the line join style. See [[LineJoin]] for the possible options. | ||
+ | |||
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === | ||
Line 9: | Line 10: | ||
=== Returns === | === Returns === | ||
Nothing. | Nothing. | ||
+ | |||
+ | == Examples == | ||
+ | === Showcase the styles === | ||
+ | <source lang="lua"> | ||
+ | function love.draw() | ||
+ | local line = {0,0, 100,20, 40,40, 50,80} | ||
+ | love.graphics.setLineWidth(15) | ||
+ | love.graphics.setColor(1, 1, 1, .7) | ||
+ | |||
+ | love.graphics.translate(300, 100) | ||
+ | love.graphics.setLineJoin("miter") | ||
+ | love.graphics.line(line) | ||
+ | |||
+ | love.graphics.translate(0, 150) | ||
+ | love.graphics.setLineJoin("none") | ||
+ | love.graphics.line(line) | ||
+ | |||
+ | love.graphics.translate(0, 150) | ||
+ | love.graphics.setLineJoin("bevel") | ||
+ | love.graphics.line(line) | ||
+ | end | ||
+ | </source> | ||
+ | |||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] | ||
* [[love.graphics.getLineJoin]] | * [[love.graphics.getLineJoin]] | ||
+ | |||
+ | == Other Languages == | ||
+ | {{i18n|love.graphics.setLineJoin}} | ||
+ | |||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Sets the line join style.}} | {{#set:Description=Sets the line join style.}} | ||
{{#set:Since=090}} | {{#set:Since=090}} | ||
{{#set:Sub-Category=State}} | {{#set:Sub-Category=State}} | ||
− | |||
− |
Latest revision as of 01:52, 1 September 2022
Sets the line join style. See LineJoin for the possible options.
Contents
Function
Synopsis
love.graphics.setLineJoin( join )
Arguments
LineJoin join
- The LineJoin to use.
Returns
Nothing.
Examples
Showcase the styles
function love.draw()
local line = {0,0, 100,20, 40,40, 50,80}
love.graphics.setLineWidth(15)
love.graphics.setColor(1, 1, 1, .7)
love.graphics.translate(300, 100)
love.graphics.setLineJoin("miter")
love.graphics.line(line)
love.graphics.translate(0, 150)
love.graphics.setLineJoin("none")
love.graphics.line(line)
love.graphics.translate(0, 150)
love.graphics.setLineJoin("bevel")
love.graphics.line(line)
end
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info