[Top][All Lists]

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

Re: Alignment and images

From: Eli Zaretskii
Subject: Re: Alignment and images
Date: Tue, 28 Jun 2016 19:24:02 +0300

> From: Lars Magne Ingebrigtsen <address@hidden>
> Date: Tue, 28 Jun 2016 15:32:26 +0200
> My first attempt was a loop like this:
>       (unless (bolp)
>         (insert (propertize " " 'display
>                             `(space :align-to (,(* (mod i width) pixels)))
>                             'intangible t)))
>       (insert-image (create-image file 'imagemagick nil
>                                   :max-width pixels
>                                   :max-height pixels)
>                     " ")
> This gives me a nice grid visually, but when moving around in the grid,
> every other <right> lands me on the align-to space thing, which doesn't
> feel very nice.

It's not clear what you want to happen instead.  Can you spell that
out for me?  Like, describe what should happen as you press <right>
time after time.

> I thought that the 'intangible should make that effect disappear,
> but it didn't.  Is that a bug?  Or am I doing something wrong?

Not sure.  Problem is, I don't build with Imagemagick, so I cannot try
your code and see what's going on there.  Can you show something
similar, but using more traditional images?

> The second attempt was to add both the image and the align-to to the
> same display property.  Kinda like this:
> (insert (propertize " " 'display
>                         `(,(create-image file 'imagemagick nil
>                                   :max-width pixels
>                                   :max-height pixels)
>                           :align-to (,(* (mod i width) pixels)))))
> That didn't work at all, but I didn't really expect it to.  :-)


reply via email to

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