#include <SLCTileComposer.h>
Uses the scanner (IComposeScanner) to flow text into a tile generating a glyph node (SLCGlyphNode) in SLCGlyphNodeList for each run. Also caches additional metrics that describe the flowed text.
- See Also
- SLCGlyphNode
- SLCGlyphNodeList
- SLCTileMeasure
- IComposeScanner
- IDrawingStyle
| SLCTileComposer::SLCTileComposer | ( | IComposeScanner * | composeScanner, | | | const PMReal & | xPosition, | | | const TextIndex & | startingIndex | | ) | | |
| inline |
Constructor prepares object to flow text.
- Parameters
| composeScanner | for accessing text (ref count gets bumped). |
| xPosition | left edge of line containing tile. |
| startingIndex | TextIndex of first character to be flowed into tile. |
| virtual SLCTileComposer::~SLCTileComposer | ( | void | | ) | |
| inlinevirtual |
Flow the range of characters, fTextIndex:fTextIndex+tile.fTextSpan, into the tile.
- Parameters
| tile | left edge and width of area in which to flow text and number of characters to be flowed(tile.fXPosition, tile.fWidth, tile.fTextSpan). |
- Returns
- kCompSuccess or kCompEndOfLine on success, other status otherwise.
- Postcondition
- SLCGlyphNodeList nodes created for each run of text.
- the width of the characters in the tile may exceed the width of the tile if there is trailing white space.
- GetTextSpan == GetFitTextSpan the characters fit within the tile.
- GetTextSpan > GetFitTextSpan the characters don't fit within the tile.
- GetTextWidth == GetFitTextWidth the characters fit within the tile.
- GetTextWidth > GetFitTextWidth the characters don't fit within the tile.
Flow characters into the tile creating a glyph node(SLCGlyphNode) for each run until the tile width is reached or an end of line character is detected. If the tile width is reached and trailing white space characters follow the last flowed character add the trailing white space into the tile (text should not be broken before trailing white space).
- Parameters
| tile | left edge and width of area in which to flow text(tile.fXPosition, tile.fWidth). |
- Returns
- kCompSuccess or kCompEndOfLine on success, other status otherwise.
- Postcondition
- SLCGlyphNodeList nodes created for each run of text.
- the width of the characters in the tile may exceed the width of the tile if there is trailing white space.
- GetTextSpan == GetFitTextSpan the characters fit within the tile.
- GetTextSpan > GetFitTextSpan the characters don't fit within the tile.
- GetTextWidth == GetFitTextWidth the characters fit within the tile.
- GetTextWidth > GetFitTextWidth the characters don't fit within the tile.
| int32 SLCTileComposer::GetFitTextSpan | ( | void | | ) | const |
| inline |
- Returns
- the number of characters that fit within the tile. Note this can include trailing white space that fits.
| PMReal SLCTileComposer::GetFitTextWidth | ( | void | | ) | const |
| inline |
- Returns
- the width of the characters that fit within the tile. Note this can include the width of trailing white space that fits.
| int32 SLCTileComposer::GetTextSpan | ( | void | | ) | const |
| inline |
- Returns
- the total number of characters flowed into the tile.
| PMReal SLCTileComposer::GetTextWidth | ( | void | | ) | const |
| inline |
- Returns
- the total width of characters flowed into the tile.