From f9ecd56f62f833f21b3475f0d1b59bc8e053a03e Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 8 Jul 2009 22:04:40 +0000 Subject: ploter refactor of rectangle handling svn path=/trunk/netsurf/; revision=8399 --- desktop/history_core.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'desktop/history_core.c') diff --git a/desktop/history_core.c b/desktop/history_core.c index 6ec2cc137..d02820b20 100644 --- a/desktop/history_core.c +++ b/desktop/history_core.c @@ -628,6 +628,11 @@ bool history_redraw_entry(struct history *history, int tailsize = 5; int xoffset = x - x0; int yoffset = y - y0; + plot_style_t pstyle_history_rect = { + .stroke_type = PLOT_OP_TYPE_SOLID, + .stroke_colour = c, + .stroke_width = entry == history->current ? 2 : 1, + }; if (clip) { if(!plot.clip(x0 + xoffset, y0 + yoffset, x1 + xoffset, y1 + yoffset)) @@ -637,9 +642,11 @@ bool history_redraw_entry(struct history *history, if (!plot.bitmap(entry->x + xoffset, entry->y + yoffset, WIDTH, HEIGHT, entry->bitmap, 0xffffff, 0)) return false; - if (!plot.rectangle(entry->x - 1 + xoffset, entry->y - 1 + yoffset, - WIDTH + 1, HEIGHT + 1, - entry == history->current ? 2 : 1, c, false, false)) + if (!plot.rectangle(entry->x - 1 + xoffset, + entry->y - 1 + yoffset, + entry->x + xoffset + WIDTH, + entry->y + yoffset + HEIGHT, + &pstyle_history_rect)) return false; if (!nsfont.font_position_in_string(&css_base_style, entry->page.title, -- cgit v1.2.3