Mercurial > projects > dynamin
changeset 92:27445f24d5fd
Add TextLayout.layoutBoxes API, but not implementation
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Thu, 05 Aug 2010 03:33:11 -0500 |
parents | 85cd0b04777c |
children | 8b2d3b3cbca6 |
files | dynamin/painting/text_layout.d |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dynamin/painting/text_layout.d Thu Aug 05 03:31:21 2010 -0500 +++ b/dynamin/painting/text_layout.d Thu Aug 05 03:33:11 2010 -0500 @@ -249,6 +249,9 @@ */ class TextLayout { string text; + Rect[] layoutBoxes; + /// + void delegate(Rect line, List!(Rect) boxes) getLineBoxes; // character formatting List!(FormatChange) formatting; // Always sorted by FormatChange.index @@ -260,7 +263,11 @@ TabStop[] tabStops; TextAlignment alignment = TextAlignment.Left; + void defaultGetLineBoxes(Rect line, List!(Rect) boxes) { + boxes.add(line); + } this(string fontFamily, double fontSize) { + getLineBoxes = &defaultGetLineBoxes; formatting = new List!(FormatChange); initialFormat.fontFamily = fontFamily; initialFormat.fontSize = fontSize;