[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46464: 27.1; wide images are hidden partially at the right edge of w
From: |
Eli Zaretskii |
Subject: |
bug#46464: 27.1; wide images are hidden partially at the right edge of window |
Date: |
Tue, 16 Feb 2021 20:56:03 +0200 |
> Date: Mon, 15 Feb 2021 17:41:15 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 46464@debbugs.gnu.org
>
> > Evaluating the form below, four images are supposed to be displayed in
> > the first visual line. But the fourth image is invisible. Similar for
> > the second visual line.
> >
> > If ':margin 5' is replaced with ':margin 20', three images are displayed
> > in the first to third visual lines. Third image in each visual line is
> > truncated at the x-coordinate 20 pixels apart from the right edge of the
> > window. It looks as if the image is not truncated and is small.
> >
> > (dotimes (i 10)
> > (let* ((w 200) (h 30) (sw 6)
> > (color (nth (% i 5) '("red" "green" "blue" "yellow" "orange")))
> > (svg (format "<svg width=\"%g\" height=\"%g\"
> > version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">
> > <rect x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" stroke=\"%s\"
> > stroke-width=\"%g\" fill=\"grey\"/>
> > </svg>" w h (/ sw 2) (/ sw 2) (- w sw) (- h sw) color sw)))
> > (insert-image (create-image svg 'svg t :margin 5 :scale 1))))
>
> I will look into this and see if this is a bug or intended behavior.
I've looked at the code: it's deliberate. We truncate the image to
fit within the window, but still leave the margins around it.
So I don't see what else needed to be fixed here, and I'm closing this
bug report.