bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40845: SVG rendering issues


From: Eli Zaretskii
Subject: bug#40845: SVG rendering issues
Date: Sun, 03 May 2020 22:17:49 +0300

> Date: Sun, 3 May 2020 19:38:39 +0100
> From: Alan Third <alan@idiocy.org>
> Cc: cpitclaudel@gmail.com, 40845@debbugs.gnu.org, pipcet@gmail.com
> 
> > > One thing is that it gets the foreground colour from the default face
> > > instead of the current face. I’m not sure how to solve that.
> > 
> > Can you describe the difficulty in using the current face?
> 
> I’m mostly unsure how I access it. I don’t think images or image.c
> have any real concept of where they are in the buffer.

When the 'load' method (in your case, svg_load) is called from
prepare_image_for_display, we have the face information handy.
Usually, at that point we don't call the 'load' method, because the
image is already loaded and cached.  But we could change the logic if
we know that the image must be modified to have a different face.
Then we can pass the color information to the 'load' method.

> I think we’d also have to recreate the image any time the face
> changed.

Yes, because changing the color(s) makes a different image.  But that
is not a problem, I think.

> I feel it would be easier just to have two or more cached images with
> different foreground and backgrounds as required.

Agreed.  At least as the first approximation; we could always change
that later if we find this not to be good enough.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]