Guillaume Ayoub
c4d663d06e
Don’t draw clipPath when defined after reference
...
Fix #1595 .
2023-08-19 10:25:28 +02:00
Guillaume Ayoub
d0ad5c1f28
Override use tag children instead of drawing their references
...
This change fixes cases when use tags are not supposed to be really drawn, for
example when used to clip paths.
2023-04-29 17:03:13 +02:00
Guillaume Ayoub
0ff8692741
Handle overflow for svg and symbol tags in SVG images
...
Fix #1864 .
2023-04-18 20:10:22 +02:00
Guillaume Ayoub
6b82aec103
Don’t draw invisible characters
...
Even spaces seem to be ignored by PDF readers, that probably rely more on text
layout than on actual word separators.
2023-04-07 23:30:40 +02:00
Guillaume Ayoub
0b1617edc8
Reorganize anchors management
2023-01-23 11:27:44 +01:00
Guillaume Ayoub
d689454fd6
Allow relative links in SVG images
...
Fix #1768 .
2022-12-02 21:30:45 +01:00
Guillaume Ayoub
88dc3df4aa
Fix and test repeating linear gradients
2022-12-02 15:31:16 +01:00
Guillaume Ayoub
c4c23fca73
More fixes around SVG gradients
2022-11-18 22:59:56 +01:00
Guillaume Ayoub
a843257e54
Improve tests and fix code for SVG gradients
2022-11-14 23:24:24 +01:00
Guillaume Ayoub
a7f46b272c
Fix tests
2022-11-14 13:27:30 +01:00
Guillaume Ayoub
0625bf7256
Fix repeating radial gradients in SVG
2022-11-14 10:35:47 +01:00
Guillaume Ayoub
e2b30af70b
Fix and clean many linear gradients in SVG
2022-11-14 09:39:50 +01:00
Guillaume Ayoub
df97154331
Fix linear gradients transform matrix
2022-11-13 17:47:30 +01:00
Guillaume Ayoub
2b94b922f9
Handle inheritance for defined elements
2022-11-13 12:25:00 +01:00
Mikhail Anikin
0de8df6621
Fix rem font size for SVG images
...
SVG pictures can have font size in rem
2022-10-27 15:14:14 +03:00
Guillaume Ayoub
8c8d059052
Don’t crash when currentColor is set on root svg tag
...
Fix #1740 .
2022-10-15 16:19:37 +02:00
Guillaume Ayoub
c9c9b3da9d
Minor changes
...
Improvements provided by refurb.
2022-10-05 18:22:35 +02:00
Guillaume Ayoub
c7265f5bc2
Improve coverage and fix gradient painting
2022-09-27 10:59:31 +02:00
Guillaume Ayoub
7d2913ccad
Improve coverage
2022-09-26 17:25:29 +02:00
Guillaume Ayoub
11bc920910
Merge branch '56.x'
2022-07-10 20:38:07 +02:00
Guillaume Ayoub
f2cecc78ea
Fix gradients with opacity set
...
Fix #1678 .
2022-07-10 20:37:33 +02:00
Guillaume Ayoub
5d9e5f7040
Update and fix URLs in comments and documentation
2022-06-28 15:59:06 +02:00
Guillaume Ayoub
e38bff8b99
Don’t crash when inherited SVG attributes are not set on the parent
2022-06-17 10:07:28 +02:00
Guillaume Ayoub
358b9469bf
Merge pull request #1651 from Kozea/pdfa
...
Support PDF/A
2022-06-13 14:52:12 +02:00
Guillaume Ayoub
26d5d8264d
Don’t check origin when URL only contains fragment
...
Fix #1650 .
2022-05-27 17:32:16 +02:00
Guillaume Ayoub
61ee64ecac
Fix domain for gradients
2022-05-27 11:26:24 +02:00
Guillaume Ayoub
09364c254e
Refactor PDF generation
2022-05-27 11:26:15 +02:00
Guillaume Ayoub
6ade02b234
Use f-strings when possible
2022-05-17 16:40:30 +02:00
Guillaume Ayoub
1545a45092
Merge branch '55.x'
2022-05-10 14:34:25 +02:00
Guillaume Ayoub
50ad4d1ac0
Fix relative paths for SVG files stored as data URLs
...
Fix #1641 .
2022-05-10 14:31:25 +02:00
Guillaume Ayoub
99294a76b5
Use different attribute name for text bounding box
2022-04-28 18:57:01 +02:00
Guillaume Ayoub
506e1908ea
Merge branch '55.x'
2022-04-28 18:50:57 +02:00
Guillaume Ayoub
f621392e2b
Fix SVG opacity bounding box coordinates
2022-04-28 18:50:30 +02:00
Guillaume Ayoub
0fcc7de817
Don’t stop rendering SVG when CSS parsing fails
...
Fix #1625 .
2022-04-28 17:36:06 +02:00
Guillaume Ayoub
fb3c39e0fc
Don’t stop rendering SVG when CSS parsing fails
...
Fix #1625 .
2022-04-28 17:35:25 +02:00
Guillaume Ayoub
ec93efc2e7
Unwrap lines
2022-04-28 16:48:46 +02:00
Guillaume Ayoub
d42cb9176a
Fix text bounding box in SVG
2022-04-28 16:48:46 +02:00
Guillaume Ayoub
607f26fbd7
Fix viewboxes in SVG markers
2022-03-27 21:46:28 +02:00
Guillaume Ayoub
7fd7413aa2
Test (and fix) SVG markers
2022-03-27 19:57:02 +02:00
Guillaume Ayoub
0792c0d3a3
Clean docstrings in modules
2022-03-25 11:47:27 +01:00
Guillaume Ayoub
abb3184b9e
Put the Matrix class in a separate module
...
It avoids imports in functions and makes document.py a bit smaller.
2022-03-19 17:47:28 +01:00
Guillaume Ayoub
d814c2e879
Remove useless dots used for old float divisions
2022-02-14 11:02:09 +01:00
Guillaume Ayoub
cf0622128a
Use the default value of decode/encode when possible
2022-02-14 10:55:47 +01:00
Guillaume Ayoub
e17e5368f7
Update and clean docstrings.
2022-02-14 07:11:30 +01:00
Guillaume Ayoub
9ffc124ab8
Merge branch '54.x'
2022-02-06 20:48:12 +01:00
Guillaume Ayoub
d60433a1da
Don’t duplicate the definition of SVG attributes
...
We want to get this list set only once, because we don’t want to change it
twice each time we add or remove an attribute.
This change probably means that extra work is now done, for style and for
definitions. This should definitely be optimized, but at least it shouldn’t be
wrong.
Tests definitely have to be added for SVG rendering.
Fix #1558 .
2022-02-06 20:35:39 +01:00
Rian McGuire
9a845cfdbb
Avoid invalid PDF operators when drawing SVG text
...
According to the PDF specification, "special graphics state" operators (q, Q, cm) aren't permitted while a text object is being drawn.
2022-01-27 17:14:20 +11:00
Guillaume Ayoub
21314bc726
Use math.inf instead of float('inf')
2022-01-24 11:35:43 +01:00
Guillaume Ayoub
302f09d54a
Always use absolute paths to get hrefs in SVG
...
Also be more fault-tolerant when trying to render use tags.
Fix #1531 .
2022-01-03 14:14:36 +01:00
Guillaume Ayoub
ed20d94c49
Don’t restore current point after empty paths
...
See Kozea/CairoSVG#346 .
2021-11-06 09:23:54 +01:00