Skip to content

SVG: accept a <line> in a <clipPath> - #2206

Open
RavSinghChandan wants to merge 1 commit into
py-pdf:masterfrom
RavSinghChandan:svg-line-in-clip-path
Open

RavSinghChandan wants to merge 1 commit into
py-pdf:masterfrom
RavSinghChandan:svg-line-in-clip-path

Conversation

@RavSinghChandan

Copy link
Copy Markdown

A <line> in a <clipPath> fails with TypeError: ShapeBuilder.line() takes 2 positional arguments but 3 were given: unlike the other shape builders, line() doesn't take the clipping_path argument.

It takes it now. A line has no area, so a clipping path made of it clips everything away, as in browsers. I checked the rendered PDF with Poppler.

test_svg_line_in_clip_path covers it; it fails without the change.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant