From c2081d28740e03d43b9dbbe9dbd5ac6484e8953a Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Sat, 27 Jul 2024 12:52:51 +0200 Subject: Add SVG support for currentColor The currentColor special value for the fill and stroke attributes allows an image to follow the same foreground color of the surounding text. --- src/html.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/html.cc') diff --git a/src/html.cc b/src/html.cc index a55fd2a8..4e2b73d1 100644 --- a/src/html.cc +++ b/src/html.cc @@ -2149,13 +2149,16 @@ DilloImage *a_Html_image_new(DilloHtml *html, const char *tag, int tagsize) dw::Image *dw = new dw::Image(alt_ptr); image = - a_Image_new(html->dw->getLayout(), (void*)(dw::core::ImgRenderer*)dw, 0); + a_Image_new(html->dw->getLayout(), (void*)(dw::core::ImgRenderer*)dw, 0, 0); a_Image_ref(image); if (HT2TB(html)->getBgColor()) image->bg_color = HT2TB(html)->getBgColor()->getColor(); + if (HT2TB(html)->getFgColor()) + image->fg_color = HT2TB(html)->getFgColor()->getColor(); + DilloHtmlImage *hi = dNew(DilloHtmlImage, 1); hi->url = url; html->images->increase(); -- cgit v1.2.3