From 680298e61ce664e95b3f8143c0c0b814d5966f2a Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 10 Jul 2009 18:36:49 +0000 Subject: plotters line refactor svn path=/trunk/netsurf/; revision=8446 --- desktop/textarea.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'desktop/textarea.c') 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); -- cgit v1.2.3