Images 💾

Last commit ⭐

commit b113ce62b578c81375573657b35038daa055e3df
Author:     Nico Weber <thakis@chromium.org>
AuthorDate: Fri Oct 4 18:57:04 2024 -0400
Commit:     Nico Weber <thakis@chromium.org>
CommitDate: Sun Oct 6 18:05:39 2024 -0400

    LibGfx: Store if a subpath is closed, and use that when stroking
    
    A stroked path that has the same start and end point looks different
    depending on if it's closed or not: If it's closed, the start/end point
    is drawn as a line join; if it's not closed, the start/end point is
    drawn as a cap.
    
    (It has an effect only for stroked paths, but not for filled paths.)
    
    So make Path remember if it's closed or not by adding a ClosePath
    segment type.
    
    This matches the canvas, pdf, svg specs.
    (TinyVG doesn't have strokes yet.)
    
    This fixes the apparent rendering regression from #25040 / #25044
    (which just made an existing bug visible).
    
    (We should probably make an inner and an outer path when stroking a
    closed path instead of just giving closed paths a round cap. When
    filled, both look identical, but the current approach produces more
    geometry. For now, this is good enough.)