HtmlViewer
HtmlViewer copied to clipboard
Reduce redundant coordinate calculations
Lots of calculations done in DrawLogic methods are repeated in the Draw methods.
DrawLogic ought to be the method, that precalculates the entire layout and Draw should not re-evaluate a single coordinate, but draw, what DrawLogic has calculated. Only viewport calculations might be done in Draw.
Blocks should remember inner and outer rectangles relative to parent. Texts should remember the lists of their LineRecs.