Issues

Issue #659 open

lineCaps and lineJoins

Karl Hobley
created an issue

lineCaps and lineJoins are very handy as they let you have things like smooth lines. I imagine the implementation won't be that easy but it will improve the quality of LOVE games. This is a feature found in HTML5 canvases

Heres a couple of HTML5 tutorials describing how these are done in HTML5 http://www.html5canvastutorials.com/tutorials/html5-canvas-line-caps/ http://www.html5canvastutorials.com/tutorials/html5-canvas-line-joins/

Comments (9)

  1. vrld

    Line-join-modes have been on my to-do for some time, thogh only as 'none' (equivalent to several calls to love.graphics.line()), 'miter' (as it is now) and 'bevel' (see also here). A round line join could probably be added to the list too, though it wouldn't play too nice with the internal implementation - especially with anti-aliasing.

    Similar things go for line caps: A square cap is simple enough, but the round one is more complicated.

  2. Karl Hobley reporter

    In my game, I got "round" line caps by simply drawing circles at each end of the line and it actually looks alright. Obviously not a great solution though but it might work as a temporary fix

  3. SpotlightKid

    I get this error when trying to use love.graphics.getLineJoin():

    Error: main.lua:89: Unknown line join
    stack traceback:
        [C]: in function 'getLineJoin'
        main.lua:89: in function 'draw'
        [string "boot.lua"]:438: in function <[string "boot.lua"]:399>
        [C]: in function 'xpcall'
    

    Manjaro Linux x86_64 with LÖVE installed from package manager (love 0.9.1-1)

  4. Log in to comment