[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pixel-based display functions
From: |
Lars Ingebrigtsen |
Subject: |
Re: Pixel-based display functions |
Date: |
Thu, 29 Jan 2015 11:37:50 +1100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> From: Lars Ingebrigtsen <address@hidden>
>> Date: Wed, 28 Jan 2015 14:27:17 +1100
>>
>> shr needs three functions to be kind-of fast to work:
>>
>> 1) A pixel equivalent of `current-column'
>
> You already have it:
>
> (car (nth 2 (posn-at-point)))
Isn't that one of those functions that says what redisplay has already
computed? So it's kinda useless.
(with-temp-buffer
(insert (propertize "hello" 'face 'variable-pitch))
(car (nth 2 (posn-at-point))))
=> nil
>> 2) A pixel equivalent of `move-to-column' (which will be imprecise, of
>> course, but that's OK)
>
> You already have it (albeit not necessarily where you'd look ;-):
>
> (vertical-motion (cons (/ PIXELS (frame-char-width)) 0))
Is that another one of those that only work after redisplay?
>> 3) A pixel equivalent of `string-width'
>
> Didn't we just go through using font-get-glyphs for that?
Yes, and it's too slow to use.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
- Re: Pixel-based display functions, (continued)
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/01/30
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions, Andreas Schwab, 2015/01/30
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions, Lars Ingebrigtsen, 2015/01/30
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/30
- Re: Pixel-based display functions, Stefan Monnier, 2015/01/30
- Re: Pixel-based display functions, Eli Zaretskii, 2015/01/28
- Re: Pixel-based display functions,
Lars Ingebrigtsen <=