From 6cb9b0349ea0b45b2c35c8bf47fa9ce1d6243f9b Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Sun, 27 Aug 2023 10:39:13 -0400 Subject: [PATCH] dox --- textlayouter.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/textlayouter.d b/textlayouter.d index 02df726..2d76330 100644 --- a/textlayouter.d +++ b/textlayouter.d @@ -1205,6 +1205,8 @@ class TextLayouter { Please note that the `caretPosition` can be `Rectangle.init`, indicating it is not present in this segment. If it is not that, it will be the bounding box of the glyph. You can use the `startFrom` parameter to skip ahead. The intended use case for this is to start from a scrolling position in the box; the first segment given will include this point. FIXME: maybe it should just go ahead and do a bounding box. Note that the segments may extend outside the point; it is just meant that it will include that and try to trim the rest. + + The segment may include all forms of whitespace, including newlines, tab characters, etc. Generally, a tab character will be in its own segment and \n will appear at the end of a segment. You will probably want to `stripRight` each segment depending on your drawing functions. +/ void getDrawableText(scope bool delegate(scope const(char)[] segment, TextStyle style, DrawingInformation information, CaretInformation[] carets...) dg, Rectangle box = Rectangle.init) { relayoutIfNecessary();