X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2FPAINTING_ANALYSIS;h=c287710ef8c34326212a3b11a507fcf97c3d4bc4;hb=3e7665f2c67a694e928724c3bc058f2f66c30b52;hp=78719f53739a40ff6b0938f641194db8f1095a4a;hpb=095c390fe2d7c983ccb0228d73c09b8da58bc206;p=lyx.git diff --git a/development/PAINTING_ANALYSIS b/development/PAINTING_ANALYSIS index 78719f5373..c287710ef8 100644 --- a/development/PAINTING_ANALYSIS +++ b/development/PAINTING_ANALYSIS @@ -66,61 +66,14 @@ drawing from metrics. Other changes are only clean-ups. -** DONE RowPainter - -Inset position is set in paintInset, paintOnlyInsets, and paintText. -This should be done only once in paintInset - -** DONE TextMetrics::drawParagraph - -We can really simplify the code when drawing is disabled only -paintInset needs to be called. - + do right at the start when drawing is already disabled - + do it in the loop for rows that are not visible on screen. - -The only thing we want to do here is to set inset positions (for -text). The other insets still use the painter with drawing disabled. - -** DONE Painter::text - -We cannot remove (or make private) the version that uses a -FontInfo because it is used by PainterInfo::draw. Document this and -remove unused arguments rtl and double spacing. This would become a specialized helper. -Proposed solution: keep the existing function, but private and without -optional arguments. - -Avoid to return (and thus compute) the width of strings? - + used by InsetSpecialChar (fixable) - + used by textDecoration() in text(): more difficult to fix - -Idea: add a version of text where wordspacing and textwidth (giving -the width of strings) are required parameters and remove optional -version. - -==> more versions, no optional parameters. - -** DONE When a document ends with a newline, add the bottom margin anyway - -The code that tests for a newline was added at 6bb98d07 in 2007. - ** When a paragraph ends with a newline, compute correctly the height of the extra row. -** Rewrite TextMetrics::completionPosAndDim using row information - -Currently it uses setRowHeight in a very weird way. In particular the -topBottomSpace parameter should be removed after that. - ** Rewrite TextMetrics::editXY, checkInsetHit using row information (getPosNearX)? The helper version should return a Row::Element instead of an InsetTable. -** Do not make RowPainter operations update x_ - -It is better to make them const and update x_ separately. +** Remember rtl status in the row object -Then it will be possible to reorder the painting of the different -elements. In particular, if text is painted last, it will be more -visible in the presence of underlines (foreign language, change -tracking, spell check). +This will avoid to pass a Paragraph object to methods that do not need it. ** Set inset position during metrics phase