Skip to content

Shapes are filled when preambule has fill="none" and paths don't declare any fill attribute #50

@maciej-perplexity

Description

@maciej-perplexity

Consider this shape:

<svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="2"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-browser">
<path d="M 10 10 H 20 V 20 H 10 L 10 10" /></svg>

This is a rectangle with fill="none", a stroke of width 2 and no fill declared in the path. It should render like this, with an empty middle.

Image

skiafy generates:

CANVAS_DIMENSIONS, 24,
FILL_RULE_NONZERO,
MOVE_TO, 10, 10,
H_LINE_TO, 20,
V_LINE_TO, 20,
H_LINE_TO, 10,
LINE_TO, 10, 10,
CLOSE

It renders as a filled rectangle:

Image

it shouldn't be FILL_RULE_NONZERO, it should be STROKE, 2,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions