Commit Graph

5 Commits

Author SHA1 Message Date
Nico Weber
c30188cd6a LibWeb: Hook up canvas lineCap and plumb it to LibGfx
To rebaseline image test expecatations, I ran:

    out/gn/Ladybird.app/Contents/MacOS/headless-browser \
        --resources $PWD/out/gn/Ladybird.app/Contents/Resources \
        --dump-failed-ref-tests \
        --run-tests $PWD/Tests/LibWeb \
        --filter 'canvas-*'

I then copied over the new baselines with

    D=Tests/LibWeb/Ref/reference/images
    cp test-dumps/canvas-implict-moves-and-lines.png \
        $D/canvas-implict-moves-and-lines-ref.png

(Note: No `-ref` suffix on first path, yes suffix on second path.)

We currently don't track if a path is open or closed, and paint
butt linecaps at the end of closed paths too. We did that with
round linecaps as well, but there that wasn't visible. This makes
closed paths look a bit weird now; we'll have to fix this in a
follow-up. In a way, this just exposes another not-yet-implemented
feature.
2024-09-27 15:05:30 -04:00
Tim Ledbetter
68a1a78a1a LibWeb: Use FIXME extended attribute where possible 2024-05-19 17:35:25 +02:00
Shannon Booth
4fe0cbcf85 LibWeb: Use 'FIXME' extended attribute where possible
This improves the debuggability of many live web pages :^)
2024-05-19 16:24:11 +02:00
Bastiaan van der Plaat
220e34b69d LibWeb: Add Canvas Context2D basic text align and text baseline support
Add the CanvasTextDrawingStyles mixin with the textAlign and
textBaseline attributes. Update fill_text in CanvasRenderingContext2D
to move the text rect by the text align and text baseline attributes.
Wrote a simple HTML example to showcase the new features.
2023-08-05 17:17:08 +02:00
Sam Atkins
9f71d65005 LibWeb: Extract CanvasPathDrawingStyles class from CRC2D 2022-08-14 11:30:40 +02:00