On Wed, Nov 18, 2015 at 10:36:54PM +0100, Jean-Marc Lasgouttes wrote: > Le 18/11/15 22:27, Scott Kostyshak a écrit : > > From what I understand, you use a static function as opposed to a static > >variable because it needs to be constantly recomputed in case, e.g. > >there is a zoom. First, I do not understand why the value changes for me > >if there is a zoom (which it does seem to do in testing) whereas the > >value was fixed before. Since I do not have a HiDPI I did not expect a > >difference. > > Well, you can expect that the spacing is, say, half of the width of a 'm'. > So if you zoom in, the size increases.
I just did not expect this change from your patch's description since before, Inset::TEXT_TO_INSET_OFFSET was fixed. I thought that there would only be improvements for HiDPI. > >Second, if it does need to be recomputed, would it be more efficient to > >only recompute it when triggered by certain events (e.g. a zoom) instead > >of recomputing it every time? > > I thought about it, but it remains to be proved that computing the value is > expensive. It is just a few multiplications. I see. Makes sense. > Nothing compared to painting or > measuring text or checking whether previews need updating, as I have learned. Scott
signature.asc
Description: PGP signature
