# HG changeset patch # User Jordan Miner # Date 1280997191 18000 # Node ID 27445f24d5fda83ba525ff92cdc43a474fefa73f # Parent 85cd0b04777c9d0f7fa63bf55c0a421b12a66a5d Add TextLayout.layoutBoxes API, but not implementation diff -r 85cd0b04777c -r 27445f24d5fd dynamin/painting/text_layout.d --- 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;