diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2009-07-10 18:36:49 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2009-07-10 18:36:49 +0000 |
commit | 680298e61ce664e95b3f8143c0c0b814d5966f2a (patch) | |
tree | cd4bdf673143a3ff8496498927de526adfb9804e /desktop/textarea.c | |
parent | 5feb7018c5228a22d370d070c1f7c3dad2c71e25 (diff) | |
download | netsurf-680298e61ce664e95b3f8143c0c0b814d5966f2a.tar.gz netsurf-680298e61ce664e95b3f8143c0c0b814d5966f2a.tar.bz2 |
plotters line refactor
svn path=/trunk/netsurf/; revision=8446
Diffstat (limited to 'desktop/textarea.c')
-rw-r--r-- | desktop/textarea.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c index 520b53090..4e08ff549 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -52,6 +52,12 @@ static plot_style_t pstyle_stroke_border = { .stroke_width = 1, }; +static plot_style_t pstyle_stroke_caret = { + .stroke_type = PLOT_OP_TYPE_SOLID, + .stroke_colour = CARET_COLOR, + .stroke_width = 1, +}; + struct line_info { unsigned int b_start; /**< Byte offset of line start */ unsigned int b_length; /**< Byte length of line */ @@ -526,7 +532,7 @@ bool textarea_set_caret(struct text_area *ta, int caret) y1 = min(y + height + 1, ta->y + ta->vis_height); plot.clip(x0, y0, x1, y1); - plot.line(x, y, x, y + height, 1, CARET_COLOR, false, false); + plot.line(x, y, x, y + height, &pstyle_stroke_caret); } ta->redraw_end_callback(ta->data); |