Guillaume Ayoub
dd7cee28a0
Use new pydyf API
2024-07-06 16:40:27 +02:00
Guillaume Ayoub
6e93e95354
Split draw module into multiple submodules
2024-06-09 00:56:43 +02:00
Guillaume Ayoub
21829a29de
Only fix gradient size when gradient transformation is applied
2024-05-30 13:27:34 +02:00
Guillaume Ayoub
ff2acf193a
Ensure that gradient size is positive to please some PDF readers
...
This was broken with Chrome and macOS Preview for example.
2024-05-30 13:19:38 +02:00
Guillaume Ayoub
172e194e85
Add extra space to include ink extents for aligned text in SVG
...
Fix #2136 .
2024-04-26 18:40:44 +02:00
Guillaume Ayoub
29597ab893
Use ruff to replace flake8 and isort
2024-04-24 16:01:13 +02:00
Guillaume Ayoub
9026b06917
Use parse_blocks_contents()
2024-04-24 10:27:46 +02:00
Guillaume Ayoub
016bd81519
Fix many different bugs with SVG markers
2024-03-25 11:18:50 +01:00
Guillaume Ayoub
3469118d31
Fix more text-anchor cases
2024-02-16 21:59:21 +01:00
Guillaume Ayoub
812e1946ec
Don’t crash when rendering SVGs with non-text a children
...
Related to #2030 . Fix #2070 .
2024-02-13 22:40:37 +01:00
Guillaume Ayoub
cf9e7cda2b
Support percentages for opacity
...
Fix #1986 .
2024-02-03 10:57:04 +01:00
Lucie Anglade
4edb03d905
Merge pull request #2043 from michaellisitsa/fix-tspan-not-respecting-text-anchor
...
Fix tspan not respecting text-anchor
2024-01-26 11:32:52 +01:00
Guillaume Ayoub
e9656ab8be
Fix coding style again
2024-01-26 11:30:05 +01:00
Guillaume Ayoub
420e6e603b
Fix coding style
2024-01-26 11:26:37 +01:00
Guillaume Ayoub
7b4bbab1d1
Ensure that bounding box is set to invisible but displayed text tags
...
Related to #2030 .
2024-01-22 23:10:10 +01:00
Guillaume Ayoub
4f109c0284
Don’t extend bounding box for invisible text nodes
...
Fix #2030 .
2024-01-22 22:53:05 +01:00
Guillaume Ayoub
4c0bd62ac1
Set "display" and "visible" as node properties
2024-01-22 22:47:39 +01:00
Michael Lisitsa
a0798881ca
Fix tspan not respecting text-anchor
2024-01-18 12:22:33 +11:00
Guillaume Ayoub
a4a6c7d9e9
Don’t mix original streams when drawing transparent text
...
Fix #2038 .
2024-01-14 13:58:41 +01:00
Guillaume Ayoub
1460522596
Improve SVG text-anchor attribute
2023-10-16 19:01:19 +02:00
Guillaume Ayoub
ff3b417e91
Fix SVG markers size, position and drawing
...
Fix #1982 .
2023-10-11 21:52:40 +02:00
Guillaume Ayoub
4dfe6079c2
Correctly handle transforms for transparent SVG elements
...
Fix #1976 .
2023-10-03 14:30:21 +02:00
Guillaume Ayoub
981ed5843c
Clean code for SVG patterns
2023-09-04 22:48:57 +02:00
Guillaume Ayoub
4e9ad95499
Merge pull request #1922 from oshmoun/master
...
Add support for textLength and lengthAdjust in SVG text elements
2023-08-19 16:30:43 +02:00
Guillaume Ayoub
c4d663d06e
Don’t draw clipPath when defined after reference
...
Fix #1595 .
2023-08-19 10:25:28 +02:00
Guillaume Ayoub
cd5608c03d
Simplify logic for textLength and lengthAdjust
...
We now:
- use a normal way of counting spaces
- simplify fallback value management for lengthAdjust
- always override letter spacing value when textLength is set with
lengthAdjust="spacing"
- always override width when textLength is set
2023-07-25 15:41:33 +02:00
Guillaume Ayoub
d001a23ead
Give matrix instead of separated values to draw_first_line
2023-07-25 14:46:18 +02:00
Guillaume Ayoub
50710de8e9
Usee *= when possible
2023-07-25 13:11:31 +02:00
Guillaume Ayoub
f4f9d3460d
Add extra missing spaces
2023-07-25 13:10:28 +02:00
Guillaume Ayoub
8c7dbb1176
Clean code style
...
Mainly keep the 79-character limit and add spaces around operators.
2023-07-25 13:07:52 +02:00
Obeida Shamoun
cf815043b9
Add support for textLength and lengthAdjust in SVG text elements
2023-07-25 04:52:33 +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