| 11 | * The objects could wrap the text as follows: |
| 12 | * none - text is not wrapped |
| 13 | * before - text wraps only from the left side |
| 14 | * after - text wraps only from the left side |
| 15 | * parallel - text wraps from both sides |
| 16 | * Default value should be parallel. |
| 17 | * Text will be flowed around intersecting (overlapping) objects (frames, etc.) |
| 18 | * The way of wrapping will depend on the available space for flowing of the text around the intersecting (overlapping) objects. |
| 19 | * The following strategy will be considered |
| 20 | * Flowing text line by line. |
| 21 | [[Image(Sophie2\branches\private\vlado\sophie2-platform\doc\spec-diagrams\LineByLineTextFlowing.png)]] |
| 22 | * Flowing text on intersection blocks will not be added in Sophie 2.0. If such functionality is desired it can be mimicked by creation of separate Frames. |
| 23 | [[Image(Sophie2\branches\private\vlado\sophie2-platform\doc\spec-diagrams\IntersectionBlockTextFlowing.png)]] |
| 24 | * A kind of priority (weight) will be present to estimate the different options for text layout in various cases of intersection (overlapping). |
| 25 | * Text layout inside a Frame. |
| 26 | * Text is divided into the following parts which define scopes for the text elements: |
| 27 | * Text - the whole flowing text. |
| 28 | * Text Part - part of the whole text, that is displayed as content of a Frame. |
| 29 | * Line - one line of visible text inside a Frame. It is composed of one or more line segments, depending on intersection with other objects (frames, etc.) |
| 30 | * Segment (Line Part) - part of a line wrapped around two objects, object and border or two borders of the container Frame. |
| 31 | |
12 | | * Create a prototype. |
13 | | * The objects could wrap the text as follows: |
14 | | * none - text is not wrapped |
15 | | * before - text wraps only from the left side |
16 | | * after - text wraps only from the left side |
17 | | * parallel - text wraps from both sides |
18 | | * Default value should be parallel. |
19 | | |
| 33 | * Refine the existing text layout algorithm. |
| 34 | * Provide layout functionality for accurate calculation of Text Parts depending on the present Frames (needed for [wiki:TEXT_CHAINING_BEHAVIOUR_R0] and [wiki:TEXT_AUTO_CHAIN_BEHAVIOUR_R0]). |
| 35 | * Fixing a known bug with layout algorithm specified at [http://www.sophie2.org/trac/wiki/TEXT_INPLACE_EDITOR_R0#Implementation]. |
| 36 | * If there is time a simple line by line text flowing will be added. |
| 37 | |
24 | | Extend TextFrameView located in org.sophie2.main.view and add the required functionality |
| 42 | * Hill climbing algorithm is used for laying out text (a general implementation is already present). |
| 43 | * Check [http://en.wikipedia.org/wiki/Hill_climbing Hill Climbing Algorithm at Wikipedia] for more information. |
| 44 | * The roles in the algorithm for the purpose of HotTextLayout: |
| 45 | * Vertex - a collection of vertex fields, such as text range (a specific Segment) and its supported properties (scope, area, position properties, etc.) |
| 46 | * Edge - represents a placement (positioning) operation for the next Segment depending on the previous Segment (it is the concrete kind of transition from a Vertex to one of its neighboring Vertex-s) |
| 47 | * Path - represents a layout of some text (group of Segments, Line or Text Part) with a calculated weight, or "badness" (it is a collection of edges defining the path from one Vertex to another). |
| 48 | * The goal is to layout the text according to the Path with lowest weight ("badness"). |
| 49 | * The algorithm can be extended with: |
| 50 | * a better separation of Segments in relation to the needs of wrapping functionality. |
| 51 | * a better Segment handling and calculations |