summaryrefslogtreecommitdiff
path: root/framebuffer
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2009-07-05 20:10:17 +0000
committerVincent Sanders <vince@netsurf-browser.org>2009-07-05 20:10:17 +0000
commit0ade453958339a28b4291aefd6fd0bd2e5038afd (patch)
tree5a6be53fef4f3790f5902d8ac574c6ef725b29bb /framebuffer
parentab2391ade1592936b95b106d17a77ff09ba852a8 (diff)
downloadnetsurf-0ade453958339a28b4291aefd6fd0bd2e5038afd.tar.gz
netsurf-0ade453958339a28b4291aefd6fd0bd2e5038afd.tar.bz2
Refactor fill plotter to take a style
svn path=/trunk/netsurf/; revision=8332
Diffstat (limited to 'framebuffer')
-rw-r--r--framebuffer/framebuffer.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/framebuffer/framebuffer.c b/framebuffer/framebuffer.c
index 0e536698e..e901d545b 100644
--- a/framebuffer/framebuffer.c
+++ b/framebuffer/framebuffer.c
@@ -197,6 +197,18 @@ framebuffer_plot_bitmap(int x, int y,
return true;
}
+static bool
+framebuffer_plot_fill(int x0, int y0, int x1, int y1, plot_style_t *style)
+{
+ nsfb_bbox_t rect;
+ rect.x0 = x0;
+ rect.y0 = y0;
+ rect.x1 = x1;
+ rect.y1 = y1;
+
+ return nsfb_plot_rectangle_fill(nsfb, &rect, style->fill_colour);
+
+}
static bool framebuffer_plot_flush(void)
{
@@ -220,7 +232,7 @@ struct plotter_table plot = {
.rectangle = nsfb_lplot_rectangle,
.line = nsfb_lplot_line,
.polygon = nsfb_lplot_polygon,
- .fill = nsfb_lplot_fill,
+ .fill = framebuffer_plot_fill,
.clip = nsfb_lplot_clip,
.text = framebuffer_plot_text,
.disc = nsfb_lplot_disc,