[cairo-commit] 2 commits - src/cairo-svg-glyph-render.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 2 10:57:37 UTC 2023


 src/cairo-svg-glyph-render.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 74feff604e9197aec509a77c836029867095b667
Merge: 260f0fd9e d11b058c1
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Thu Feb 2 10:57:35 2023 +0000

    Merge branch 'fix-svg-render-debug' into 'master'
    
    Fix build with -DDEBUG_SVG_RENDER
    
    See merge request cairo/cairo!439

commit d11b058c10a0ba7bb21c848022758bdc9bcd3981
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Wed Feb 1 06:23:43 2023 +1030

    Fix build with -DDEBUG_SVG_RENDER

diff --git a/src/cairo-svg-glyph-render.c b/src/cairo-svg-glyph-render.c
index 3c14f8c59..cac8a7a73 100644
--- a/src/cairo-svg-glyph-render.c
+++ b/src/cairo-svg-glyph-render.c
@@ -3222,11 +3222,20 @@ _cairo_debug_svg_render (cairo_t       *cr,
                          double         units_per_em,
                          int            debug_level)
 {
-    return _cairo_render_svg_glyph (svg_document,
-                                    1, 1, 1,
-                                    units_per_em,
-                                    NULL, 0,
-                                    cr) == CAIRO_STATUS_SUCCESS;
+    cairo_status_t status;
+    cairo_bool_t foreground_source_used;
+    cairo_pattern_t *foreground = _cairo_pattern_create_foreground_marker ();
+
+    status = _cairo_render_svg_glyph (svg_document,
+				      1, 1, 1,
+				      units_per_em,
+				      NULL, 0,
+				      cr,
+				      foreground,
+				      &foreground_source_used);
+    cairo_pattern_destroy (foreground);
+
+    return status == CAIRO_STATUS_SUCCESS;
 }
 
 #endif /* DEBUG_SVG_RENDER */


More information about the cairo-commit mailing list