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

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

bug#44065: 28.0.50; SVG image not shown completely


From: Andy Moreton
Subject: bug#44065: 28.0.50; SVG image not shown completely
Date: Sun, 25 Oct 2020 12:26:59 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.50 (windows-nt)

On Sat 24 Oct 2020, Eli Zaretskii wrote:

>> Date: Sat, 24 Oct 2020 18:01:24 +0100
>> From: Alan Third <alan@idiocy.org>
>> Cc: Andy Moreton <andrewjmoreton@gmail.com>, 44065@debbugs.gnu.org
>> 
>> On Sat, Oct 24, 2020 at 10:09:59AM +0300, Eli Zaretskii wrote:
>> > 
>> > (We cannot just call a new function from an image library without
>> > loading it from its DLL at run time on MS-Windows.)
>> 
>> Ah, that's not something I was aware of. Thanks for fixing it.
>
> No sweat.  And thanks for fixing the original problem to begin with.

A new report in bug#44206 shows that this patch caused other problems.

The docs for rsvg_handle_get_geometry_for_layer show it does not report
minimum sizes, as it ignores clipping regions. Thus for an SVG file
which contains a small clipping region applied to a larger image, the
reported sizes are incorrect.

Also, rsvg_handle_get_geometry_for_layer returns a gboolean, which the
docs do not describe, but other API functions return TRUE for success
and FALSE for failure. This should be checked.

Running under gdb with the image from bug#44206 shows that the bounds
reported by rsvg_handle_get_geometry_for_layer are zero (so the
functions may have failed and returned FALSE).

The original report here showed that rsvg_handle_get_dimensions did not
alwyas return the correct results. It is documented to require a prior
call to rsvg_handle_set_dpi to give correct results, but that is not
called in image.c.

Perhaps this can be fixed by reverting to the original code with
addition of a call to rsvg_handle_set_dpi or rsvg_handle_set_dpi_x_y
before calling rsvg_handle_get_dimensions.

    AndyM






reply via email to

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