summaryrefslogtreecommitdiff
path: root/gtk
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 /gtk
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 'gtk')
-rw-r--r--gtk/gtk_plotters.c8
-rw-r--r--gtk/gtk_print.c6
-rw-r--r--gtk/gtk_thumbnail.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtk_plotters.c b/gtk/gtk_plotters.c
index c746483c2..6c7306b11 100644
--- a/gtk/gtk_plotters.c
+++ b/gtk/gtk_plotters.c
@@ -56,7 +56,7 @@ static bool nsgtk_plot_line(int x0, int y0, int x1, int y1, int width,
static bool nsgtk_plot_polygon(const int *p, unsigned int n, colour fill);
static bool nsgtk_plot_path(const float *p, unsigned int n, colour fill, float width,
colour c, const float transform[6]);
-static bool nsgtk_plot_fill(int x0, int y0, int x1, int y1, colour c);
+static bool nsgtk_plot_fill(int x0, int y0, int x1, int y1, plot_style_t *style);
static bool nsgtk_plot_clip(int clip_x0, int clip_y0,
int clip_x1, int clip_y1);
static bool nsgtk_plot_text(int x, int y, const struct css_style *style,
@@ -87,7 +87,7 @@ const struct plotter_table nsgtk_plotters = {
.arc = nsgtk_plot_arc,
.bitmap = nsgtk_plot_bitmap,
.path = nsgtk_plot_path,
- .option_knockout = true
+ .option_knockout = true
};
@@ -155,9 +155,9 @@ bool nsgtk_plot_polygon(const int *p, unsigned int n, colour fill)
}
-bool nsgtk_plot_fill(int x0, int y0, int x1, int y1, colour c)
+bool nsgtk_plot_fill(int x0, int y0, int x1, int y1, plot_style_t *style)
{
- nsgtk_set_colour(c);
+ nsgtk_set_colour(style->fill_colour);
nsgtk_set_solid();
cairo_set_line_width(current_cr, 0);
diff --git a/gtk/gtk_print.c b/gtk/gtk_print.c
index cb86f93a8..4e7251ebd 100644
--- a/gtk/gtk_print.c
+++ b/gtk/gtk_print.c
@@ -52,7 +52,7 @@ static bool nsgtk_print_plot_line(int x0, int y0, int x1, int y1, int width,
static bool nsgtk_print_plot_polygon(const int *p, unsigned int n, colour fill);
static bool nsgtk_print_plot_path(const float *p, unsigned int n, colour fill,
float width, colour c, const float transform[6]);
-static bool nsgtk_print_plot_fill(int x0, int y0, int x1, int y1, colour c);
+static bool nsgtk_print_plot_fill(int x0, int y0, int x1, int y1, plot_style_t *style);
static bool nsgtk_print_plot_clip(int clip_x0, int clip_y0,
int clip_x1, int clip_y1);
static bool nsgtk_print_plot_text(int x, int y, const struct css_style *style,
@@ -183,12 +183,12 @@ bool nsgtk_print_plot_polygon(const int *p, unsigned int n, colour fill)
}
-bool nsgtk_print_plot_fill(int x0, int y0, int x1, int y1, colour c)
+bool nsgtk_print_plot_fill(int x0, int y0, int x1, int y1, plot_style_t *style)
{
LOG(("Plotting fill. x0: %i ;\t y0: %i ;\t x1: %i ;\t y1: %i",
x0,y0,x1,y1));
- nsgtk_print_set_colour(c);
+ nsgtk_print_set_colour(style->fill_colour);
nsgtk_print_set_solid();
/* Normalize boundaries of the area - to prevent overflows.
diff --git a/gtk/gtk_thumbnail.c b/gtk/gtk_thumbnail.c
index b3d1bc2f6..32f670958 100644
--- a/gtk/gtk_thumbnail.c
+++ b/gtk/gtk_thumbnail.c
@@ -95,7 +95,7 @@ bool thumbnail_create(struct content *content, struct bitmap *bitmap,
#ifdef CAIRO_VERSION
current_cr = gdk_cairo_create(current_drawable);
#endif
- plot.fill(0, 0, cwidth, cwidth, 0xffffffff);
+ plot.fill(0, 0, cwidth, cwidth, plot_style_fill_white);
/* render the content */
content_redraw(content, 0, 0, content->width, content->width,