diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-07-27 12:52:51 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-07-27 12:54:47 +0200 |
commit | c2081d28740e03d43b9dbbe9dbd5ac6484e8953a (patch) | |
tree | eb1c8ac0965fee0139ee58db131a142b2150b4c8 /src/html.cc | |
parent | 59b746f013f60050b91cb5f6f8dd4a96c47f380e (diff) |
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.
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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(); |