Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix marker-start being drawn on mid vertices #1436

Merged
merged 1 commit into from
Sep 1, 2021

Conversation

rianmcguire
Copy link
Contributor

Expected behaviour (Firefox 91):
image

WeasyPrint 53.2:
image

WeasyPrint with fix:
image

Example:

<svg viewBox="0 0 200 400" width="200">
  <g>
    <defs>
      <marker
        id="arrow"
        viewBox="0 0 10 10"
        refX="0"
        refY="5"
        markerWidth="4"
        markerHeight="4"
        orient="auto"
        fill="red"
        stroke="none"
      >
        <path d="M 0 0 L 10 5 L 0 10 z"></path>
      </marker>
    </defs>
    <path
      d="M 10 100 l 50, 10 l 50 0 l 50 -20"
      fill="none"
      stroke="black"
      stroke-width="2"
      marker-start="url(#arrow)"
    />
    <path
      d="M 10 200 l 50, 10 l 50 0 l 50 -20"
      fill="none"
      stroke="black"
      stroke-width="2"
      marker-end="url(#arrow)"
    />
    <path
      d="M 10 300 l 50, 10 l 50 0 l 50 -20"
      fill="none"
      stroke="black"
      stroke-width="2"
      marker-mid="url(#arrow)"
    />
  </g>
</svg>

@grewn0uille grewn0uille changed the base branch from master to 53.x September 1, 2021 08:04
@grewn0uille grewn0uille changed the base branch from 53.x to master September 1, 2021 08:04
@grewn0uille grewn0uille merged commit 5816d77 into Kozea:master Sep 1, 2021
@grewn0uille
Copy link
Member

Thank you!

@grewn0uille grewn0uille added this to the 53.3 milestone Sep 1, 2021
@grewn0uille grewn0uille added the bug Existing features not working as expected label Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants