Skip to content

Canvas 2D path drawing renders no pixels #213

Description

@XDLCS

Description

Canvas 2D path drawing produces no pixels when rasterized in screenshots: beginPath() + arc() + fill() and moveTo()/lineTo() + stroke() render nothing, while the "block" primitives (fillRect, putImageData) render correctly. This reproduces on v1.0.0 through current HEAD (3cbc3c2).

Steps to Reproduce

  1. moli serve --layout (HEAD build).
  2. Navigate (CDP Page.navigate) to a page with three 120×120 canvases:
    • #c1: fillRect in blue (0,0,255)
    • #c2: beginPath(); arc(...); fill() in red (255,0,0)
    • #c3: moveTo(0,0); lineTo(100,100); stroke() in green (0,255,0)
    • #c4: putImageData with a cyan (0,255,255) 10×10 block
  3. Page.captureScreenshot and scan the canvas regions for the expected solid colors.

Actual Behavior

  • Blue fillRect → pixels present at expected coordinates ✅
  • Cyan putImageData → pixels present ✅
  • Red arc path → no pixels
  • Green line path → no pixels

Expected Behavior

Path-based fills and strokes should rasterize like Chromium (Chrome headless-shell 131 renders all four correctly at the same coordinates).

Impact

Charting/libs, icon fonts drawn via paths, Lottie-like canvases, and any getContext('2d') path rendering are invisible in screenshots. This is the single most visible rendering-boundary gap for image automation and visual diffing.

Environment

  • moli v1.0.0, v1.0.2, v1.0.4, and HEAD @ 3cbc3c2 all reproduce
  • Verified via CDP screenshot + pixel scan (Pillow), screenshot file available on request

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions