Anton Danilkin
982c37f544
Fix warnings and pipeline failure
2021-04-13 12:26:16 +02:00
Anton Danilkin
3cb6377c08
Revert "Fix filter being used on the use element causing the content to be clipped"
...
This reverts commit 2a8672d06e .
2021-04-13 04:31:07 +02:00
Anton Danilkin
90aa943555
Add support for PDF Type 3 fonts
2021-04-13 04:31:07 +02:00
Anton Danilkin
1c1bceb581
Emit bitmap glyph data as images instead of as a bunch of squares, as this results in smaller file size and better quality, allowing the use of shades of gray
2021-04-13 04:31:07 +02:00
Anton Danilkin
1fe3c55712
Do not emit empty glyph paths
2021-04-12 18:49:03 +02:00
Anton Danilkin
2a8672d06e
Fix filter being used on the use element causing the content to be clipped
2021-04-12 11:55:56 +02:00
Anton Danilkin
87d5c9e8d1
Add missing include
2021-04-12 00:17:51 +02:00
Anton Danilkin
5932084df3
Remove _cairo_memory_stream_to_string
2021-04-12 00:00:45 +02:00
Anton Danilkin
917f366ad1
Add a test for #431
2021-04-11 23:59:47 +02:00
Anton Danilkin
39dabd34fe
Mark CAIRO_PATTERN_TYPE_MESH as unsupported and impose a limit on recording surfaces depth
2021-04-11 23:59:47 +02:00
Anton Danilkin
c91afd777a
Do not use parent_matrix in the mask operation
2021-04-11 23:59:47 +02:00
Anton Danilkin
d44bb67c7f
Fix clip-rule being emitted on the wrong elements
2021-04-11 23:59:47 +02:00
Anton Danilkin
580e9b9be6
Add my name to the header of cairo-svg-surface.c
2021-04-11 23:59:47 +02:00
Anton Danilkin
500b39e98f
Move cairo_svg_surface_t to cairo-svg-surface.c
2021-04-11 23:59:47 +02:00
Anton Danilkin
ceae137ba6
Finish implementing correct paints in transformed recording patterns
2021-04-11 23:59:47 +02:00
Anton Danilkin
c5b24a3e12
Start implementing correct paints in transformed recording patterns
2021-04-11 23:59:47 +02:00
Anton Danilkin
c2ea2848fd
Simplify _cairo_svg_surface_emit_composite_surface_pattern
2021-04-11 23:59:47 +02:00
Anton Danilkin
89eda6f650
Simplify ignoring of statuses
2021-04-11 23:59:47 +02:00
Anton Danilkin
cf0023d7ce
Simplify SVG document generation
2021-04-11 23:59:47 +02:00
Anton Danilkin
733c38b9f4
Fix and clarify _cairo_svg_surface_do_operator
2021-04-11 23:59:47 +02:00
Anton Danilkin
b5baac736f
Do not create temporary single-color patterns. Also, do not try to support CAIRO_CONTENT_COLOR
2021-04-11 23:59:47 +02:00
Anton Danilkin
d88ac55b9f
Remove SVG 1.2 and CAIRO_CONTENT_COLOR SVG boilerplate targets
2021-04-11 23:59:47 +02:00
Anton Danilkin
9ac707374f
Fix problems with radial gradients
2021-04-11 23:59:47 +02:00
Anton Danilkin
d397ab6d10
Change the default SVG unit to user unit
2021-04-11 23:59:47 +02:00
Anton Danilkin
f85834a1f5
Do not use the style attribute
2021-04-11 23:59:47 +02:00
Anton Danilkin
71eef9c8bc
Implement the rest of the operators
2021-04-11 23:59:47 +02:00
Anton Danilkin
0df89ca8d8
Implement most of the non-blending operators
2021-04-11 23:59:47 +02:00
Anton Danilkin
e728eb43de
Implement the in operator
2021-04-11 23:59:47 +02:00
Anton Danilkin
961db5b846
Implement operators for the rest of operations
2021-04-11 23:59:47 +02:00
Anton Danilkin
1a03d883ab
Implement operators for the mask operation
2021-04-11 23:59:47 +02:00
Anton Danilkin
a89960a67c
Add support for the source and clear operators for the paint operation
2021-04-11 23:59:47 +02:00
Anton Danilkin
f6f73ba836
Add a layer of indiraction to calls to the clipper
2021-04-11 23:59:47 +02:00
Anton Danilkin
daeb9736e9
Update the analyze mode of operations
2021-04-11 23:59:47 +02:00
Anton Danilkin
2a9e189410
Remove the use of extra_attributes
2021-04-11 23:59:47 +02:00
Anton Danilkin
d59c7fb71f
Remove the use of discard_filter
2021-04-11 23:59:47 +02:00
Anton Danilkin
0cddf4769c
Introduce _cairo_svg_surface_svg_clip_or_svg_mask_should_be_used
2021-04-11 23:59:47 +02:00
Anton Danilkin
7a21a930e9
Add warning supression in one place and remove them in others
2021-04-11 23:59:47 +02:00
Anton Danilkin
3b6ea32854
Do not check the status after creating a memory stream
...
As we do not check the status after _cairo_output_stream_printf
and _cairo_memory_stream_copy (which are more common operations)
anyway.
This simplifies the code, but keeps it correct, as the status
will be propagated anyway, just a bit later.
2021-04-11 23:59:47 +02:00
Anton Danilkin
170fa0f9bb
Fix using signed types where unsigned ones were needed
2021-04-11 23:59:47 +02:00
Anton Danilkin
7ade55ac5b
Add new SVG filters system
2021-04-11 23:59:47 +02:00
Anton Danilkin
b340dc19f2
Fix emitting black background for color-only non-bounded SVG surfaces
2021-04-11 23:59:47 +02:00
Anton Danilkin
fa5179e9fd
Add a test with operator samples from https://cairographics.org/operators/
2021-04-11 23:59:47 +02:00
Anton Danilkin
170f8812fb
Add a test for #361
2021-04-11 23:59:47 +02:00
Anton Danilkin
9563d6b661
Ignore .idea, compile_commands.json and /build
2021-04-11 23:59:47 +02:00
Anton Danilkin
18c0196414
Fix generating syntactically invalid SVG files
2021-04-11 23:59:47 +02:00
Anton Danilkin
8c08f499bd
Fix problems in the SVG backend related to outputting surfaces and patterns
...
Now the SVG surface should work correctly work with bounded and unbounded image (-like) and recording surfaces with NONE and REPEAT extends as source for all operations.
Fill or stroke with an unbounded surface as source now means using clip or mask respectively.
Fix using unitialized memory in the SVG surface.
Also fix unintialized memory and working with offsetted images in the recording surface.
2021-04-11 23:59:47 +02:00
Heiko Lewin
277a1daec8
Merge branch 'type1_find_segments_bounds_check' into 'master'
...
Fix out of bounds access in cairo_type1_font_subset_find_segments
See merge request cairo/cairo!146
2021-04-11 16:35:03 +00:00
Uli Schlachter
1484cfa551
Fix out of bounds access in cairo_type1_font_subset_find_segments
...
This function parses some raw font data and it trusts the font to be
well-formed. This means that a font can just say "this segment is a
gigabyte large" and the code will happily jump ahead in memory. Bad
things then happen in practice.
Fix this by adding lots of bounds check.
Also, an existing bounds check makes sure we are still before the end of
the data, but then happily reads the next six bytes. Fix this by making
sure we actually have six bytes of data.
No regression test since the last few times I tried to do this for font
issues, I ended up with a large/huge blob of font data. Too large for
the test suite.
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27969
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-11 16:35:02 +00:00
Uli Schlachter
26663cf3be
Merge branch 'fix_obvious_ub' into 'master'
...
Fix undefined left-shifts
See merge request cairo/cairo!149
2021-04-11 05:37:49 +00:00
Heiko Lewin
3ca8a46caf
Minor corrections
2021-04-11 02:07:10 +02:00