Guillaume Ayoub
cbf10b9dc7
Don’t fail when markers are undefined references
...
Fix #2239 .
2024-08-23 13:44:43 +02:00
Guillaume Ayoub
6ebb4f44ef
Apply stylesheet and other basic operations to SVG root tag
...
Related to #1740 and #2234 .
2024-08-22 15:19:44 +02:00
Guillaume Ayoub
b75e683c98
Correctly apply cascade and CSS management to use tags
...
Related to #2234 .
2024-08-22 00:32:58 +02:00
Guillaume Ayoub
1043ffced1
Don’t display SVG symbols directly
...
Related to #2234 .
2024-08-22 00:18:45 +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
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
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
d689454fd6
Allow relative links in SVG images
...
Fix #1768 .
2022-12-02 21:30:45 +01:00
Guillaume Ayoub
c4c23fca73
More fixes around SVG gradients
2022-11-18 22:59:56 +01:00
Guillaume Ayoub
2b94b922f9
Handle inheritance for defined elements
2022-11-13 12:25:00 +01: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
e38bff8b99
Don’t crash when inherited SVG attributes are not set on the parent
2022-06-17 10:07:28 +02:00
Guillaume Ayoub
f621392e2b
Fix SVG opacity bounding box coordinates
2022-04-28 18:50:30 +02:00
Guillaume Ayoub
607f26fbd7
Fix viewboxes in SVG markers
2022-03-27 21:46:28 +02:00
Guillaume Ayoub
0792c0d3a3
Clean docstrings in modules
2022-03-25 11:47:27 +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
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
9a720ac081
Don’t serialize and parse again inline SVG files
...
Fix #1443 .
2021-09-12 17:40:19 +02:00
Guillaume Ayoub
37af386852
Cache SVG use tags
...
Fix #1439 .
2021-09-11 14:57:47 +02:00
Rian McGuire
e4734e05ca
Fix marker-start being drawn on mid vertices
2021-09-01 12:38:09 +10:00
Guillaume Ayoub
61ff7f0e1c
Handle full "display" property
...
In CSS Display Module Level 3, the "display" property gets a long
representation allowing:
- a clear separation between inner and outer display type,
- new supported types (contents, run-in, flow-root…),
- inline list items.
This commit allows the (retrocompatible) new long syntax for "display". It also
supports the "flow-root" value. It doesn’t support values related to ruby, and
it doesn’t support the new "contents" and "run-in" display types.
This work gives the possibility to simplify the code in the block_*_layout
functions, and to improve the overall layout.
Related to #36 .
2021-08-23 21:54:28 +02:00
Guillaume Ayoub
783378d14a
Fix reference for percentages
2021-07-31 08:29:23 +02:00
Lucie Anglade
7f6e99bc58
Handle errors in points
2021-07-30 16:08:19 +02:00
Lucie Anglade
c104c8e099
Handle unit in dash array
2021-07-30 15:15:50 +02:00
Guillaume Ayoub
a0ad94b143
Don’t stroke when stroke-width is 0
...
Related to #1403 .
2021-07-23 22:36:05 +02:00
Guillaume Ayoub
8d7bcead0a
Fix how x and y attributes are handled
...
Fix #1403 .
2021-07-23 22:17:37 +02:00
Guillaume Ayoub
c7b97fa3bf
Handle simple cases of clip-path
...
Fix #1374 .
2021-07-18 09:36:14 +02:00
Guillaume Ayoub
add1dad80b
Use named parameters for stream transformation
2021-07-17 14:25:58 +02:00
Guillaume Ayoub
a4cc61c7b8
Use matrix.values instead of indices
2021-07-17 13:46:46 +02:00
Guillaume Ayoub
e6be0fc47f
Fix text children
2021-07-16 15:17:15 +02:00
Guillaume Ayoub
231736d73e
Use the original SVG tree when drawing patterns
...
In Pattern, we want self.tree to be the pattern tree when we call draw(), but
we want self.tree to be the original SVG tree for everything else, like finding
defs.
This commit replaces self.tree with the original SVG tree after we call draw().
Fix #1394 .
2021-07-12 11:42:07 +02:00
Guillaume Ayoub
c0c9879bc5
Handle stroke-opacity and fill-opacity
...
This commit also cleans a lot of things about the way opacity is handled,
with many small bug fixes.
Fix #1371 .
2021-06-02 20:35:06 +02:00
Guillaume Ayoub
41d4a262d3
Don’t copy the already-cascaded style when copying nodes
...
Fix #1370 .
2021-06-01 22:30:54 +02:00