richedit: Avoid re-calculating positions found in wrapping for painting.

Dylan Smith dylan.ah.smith at
Fri Dec 19 08:54:58 CST 2008

When the text is wrapped, the positions for all the runs, paragraphs,
and cells are already calculated and stored.  The only thing left to do
for painting is to offset them by the formatting rectangle and the
scroll position.

In this patch I tried to use the context point to hold the value to
offset the stored positions, rather than using them to hold the
current x and y positions.  This should make it easier to prevent
inconsistencies between the stored positions and the positions
used to painted the display items on the screen.

It should also make it easier to include the offset for the horizontal
scrollbar, when it is implemented, since only the context point needs to
be modified in order to affecting the painting positions.
 dlls/riched20/paint.c |  203 +++++++++++++++++++------------------------------
 dlls/riched20/wrap.c  |    3 +-
 2 files changed, 81 insertions(+), 125 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-richedit-Avoid-re-calculating-positions-found-in.diff.txt

More information about the wine-patches mailing list