Line numbers for soft-wrapped styled text?

hh hh at hyperhh.de
Sat Apr 1 12:42:01 EDT 2017


> Alex T. wrote:
> I set out to optimise the 'visibleLineNumber' function, and succeeded
> in getting it down to approx 20% of the original version, by:
> - reduce from 2 to 1 height calculations per iteration
> - convert from recursive to iterative
> - use Newton-Raphson style linear interpolation, with tweaks to avoid
> the pathological end cases
> - optimise the start values for finding the last visible line based on
> the effective field height and min allowed text size

Alex,
please think about posting this. It is certainly valuable for other use
cases.

Hermann
(This post is NOT an April 1 - joke)




More information about the use-livecode mailing list