This places an upper-bound on how far back the soft wrapping code needs to go: at worst, it's the length of a chunk. A soft line break is then made at the end of every chunk. white space, or at least grapheme boundary) in the vicinity of the proposed chunk boundary. This can be done with only local calculations as well, including a search for a good break point (e.g. However, with this alone it still needs to calculate soft-wrapping starting at the beginning of the line that contains the content, which obviously won't work in real time for very long lines. vertical cursor movement calculations), with no caching needed. This is efficient enough to be done on-the-fly every time it's needed (including for e.g. can then be done locally afterwards, in that vicinity, and everything positioned on screen based on that. This lets the display code jump directly to the vicinity of the content that should be on screen, without needing any information about how it will be displayed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |