invalidation on edit

General TRichView support forum. Please post your questions here
Post Reply
blsstdok
Posts: 25
Joined: Tue Jun 07, 2011 2:36 pm

invalidation on edit

Post by blsstdok »

When text is typed into the editor, it seems that the entire paragraph is invalidated with each keypress.

I am doing a lot of CPU-expensive custom drawing and things get real slow when a paragraph becomes more than a few words; especially when it is more than two or three lines.

So, two questions:

1. Is there any way to limit the invalidation on character insertion to the word in which it appears, or at the most to the line in which it appears?

2. How can I "break up" a line paint into individual words per line, rather than an entire line at a time? This would allow me to cache the work per-word to avoid the CPU calculations on every redraw. Right now, it is sending a paint command for a run of text with the same attributes up to an entire line. I could do some caching if it was broken up by words (whitespace delimited) instead.
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

1. Sorry, no.
2. Text is broken into words only when ParaStyle.Alignment=rvaJustify.
This mode, obviously, increases memory usage.
Post Reply