Changes between Version 8 and Version 9 of TEXT_PARAGRAPH_ALIGN_R0


Ignore:
Timestamp:
07/03/09 13:53:09 (16 years ago)
Author:
vlado
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TEXT_PARAGRAPH_ALIGN_R0

    v8 v9  
    4343 
    4444= Design = 
    45 ^(Describe your design here.)^ 
     45 * Add Badness.addBrokenWord to consider the word breaks when calculating badness value. 
     46 * Modify EdgeKind.SEGMENT to handle: 
     47  * the case of word breaks. 
     48  * Vertex.WHITE_SPACE_EXTRA value which adds white space to space separators in the text (needed for justified alignment). 
     49 * When the currently handled word from the text can not fit into the line that the algorithm is processing, the algorithm's modifications are as follows: 
     50  * Badness of SEGMENT should be higher than Badness of CLOSE_LINE (thus, flowing the current word on a new line). 
     51  * If left alignment is chosen no further changes are needed. 
     52  * If justified alignment is chosen 
     53   * Get all previous SEGMENTs until OPEN_LINE is reached (using Vertex.LAST_EDGE vertex field). 
     54   * Calculate the extra space (WHITE_SPACE_EXTRA) that has to be added: (white space extra) = (space left on the line) / (number of previous SEGMENTs on the line) - 1. 
     55   * Modify BASE_POINT vertex field for each of the SEGMENTs on the line. 
     56 * Add a paragraph halo and hud (TextParagraphHud class) 
     57  * Follow the UI specified in [wiki:TEXT_PARAGRAPH_SPACING_R0#Analysis] 
     58  * For now add only alignment controls. 
     59  * Move the First line indent control from TextFontHud to TextParagraphHud.   
    4660 
    4761= Implementation =