diff options
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 87bbefdd365..1b49e637350 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -154,14 +154,19 @@ static void format_draw_color(const TextDrawContext *tdc, char formatchar) /************************** draw text *****************************/ -/* Notes on word-wrap +/** + * Notes on word-wrap * -- - * All word-wrap functions follow the algorithm below to maintain consistency. - * line The line to wrap (tabs converted to spaces) - * view_width The maximum number of characters displayable in the region - * This equals region_width/font_width for the region - * wrap_chars Characters that allow wrapping. This equals [' ', '\t', '-'] + * All word-wrap functions follow the algorithm below to maintain consistency: + * - line: + * The line to wrap (tabs converted to spaces) + * - view_width: + * The maximum number of characters displayable in the region + * This equals region_width/font_width for the region + * - wrap_chars: + * Characters that allow wrapping. This equals [' ', '\t', '-'] * + * \code{.py} * def wrap(line, view_width, wrap_chars): * draw_start = 0 * draw_end = view_width @@ -175,6 +180,7 @@ static void format_draw_color(const TextDrawContext *tdc, char formatchar) * draw_end = pos+1 * pos += 1 * print line[draw_start:] + * \encode */ int wrap_width(const SpaceText *st, ARegion *ar) |