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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 17 20:24:20 UTC 2023


 src/cairo-colr-glyph-render.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 68ee427b66174bdf51f7363aa8f3946224e27aac
Merge: 1c544160b ef9ea1435
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Tue Jan 17 20:24:16 2023 +0000

    Merge branch 'colr-foreground-alpha' into 'master'
    
    [COLRv1] Apply alpha to foreground color
    
    See merge request cairo/cairo!409

commit ef9ea14352db7453464c204e7d7e9eab9afa1f27
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Jan 17 06:48:28 2023 -0700

    [COLRv1] Apply alpha to foreground color

diff --git a/src/cairo-colr-glyph-render.c b/src/cairo-colr-glyph-render.c
index 2388d9e02..6dfcc9831 100644
--- a/src/cairo-colr-glyph-render.c
+++ b/src/cairo-colr-glyph-render.c
@@ -262,11 +262,15 @@ draw_paint_solid (cairo_colr_glyph_render_t *render,
 
     get_palette_color (render, &solid->color, &color, &is_foreground_color);
     if (is_foreground_color)
+    {
 	cairo_set_source (cr, render->foreground_color);
+	cairo_paint_with_alpha (cr, color.alpha);
+    }
     else
+    {
 	cairo_set_source_rgba (cr, color.red, color.green, color.blue, color.alpha);
-
-    cairo_paint (cr);
+	cairo_paint (cr);
+    }
 
     return CAIRO_STATUS_SUCCESS;
 }


More information about the cairo-commit mailing list