From aa2684341170424783f9937d8fe441fb3984d825 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 30 Jun 2009 13:02:23 +0000 Subject: Improve bitmap plotter API svn path=/trunk/netsurf/; revision=8195 --- beos/beos_plotters.cpp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'beos/beos_plotters.cpp') diff --git a/beos/beos_plotters.cpp b/beos/beos_plotters.cpp index 445d1f319..754c0d75d 100644 --- a/beos/beos_plotters.cpp +++ b/beos/beos_plotters.cpp @@ -78,10 +78,8 @@ static bool nsbeos_plot_disc(int x, int y, int radius, colour c, bool filled); static bool nsbeos_plot_arc(int x, int y, int radius, int angle1, int angle2, colour c); static bool nsbeos_plot_bitmap(int x, int y, int width, int height, - struct bitmap *bitmap, colour bg, struct content *content); -static bool nsbeos_plot_bitmap_tile(int x, int y, int width, int height, struct bitmap *bitmap, colour bg, - bool repeat_x, bool repeat_y, struct content *content); + bitmap_flags_t flags); #if 0 /* GTK */ static GdkRectangle cliprect; @@ -107,7 +105,6 @@ const struct plotter_table nsbeos_plotters = { nsbeos_plot_disc, nsbeos_plot_arc, nsbeos_plot_bitmap, - nsbeos_plot_bitmap_tile, NULL, NULL, NULL, @@ -583,28 +580,21 @@ static bool nsbeos_plot_bbitmap(int x, int y, int width, int height, return true; } -bool nsbeos_plot_bitmap(int x, int y, int width, int height, - struct bitmap *bitmap, colour bg, struct content *content) -{ - BBitmap *b = nsbeos_bitmap_get_primary(bitmap); - return nsbeos_plot_bbitmap(x, y, width, height, b, bg); -#if 0 /* GTK */ - GdkPixbuf *pixbuf = gtk_bitmap_get_primary(bitmap); - return nsbeos_plot_pixbuf(x, y, width, height, pixbuf, bg); -#endif -} -bool nsbeos_plot_bitmap_tile(int x, int y, int width, int height, +bool nsbeos_plot_bitmap(int x, int y, int width, int height, struct bitmap *bitmap, colour bg, - bool repeat_x, bool repeat_y, struct content *content) + bitmap_flags_t flags) { int doneheight = 0, donewidth = 0; BBitmap *primary; BBitmap *pretiled; + bool repeat_x = (flags & BITMAPF_REPEAT_X); + bool repeat_y = (flags & BITMAPF_REPEAT_Y); if (!(repeat_x || repeat_y)) { - /* Not repeating at all, so just pass it on */ - return nsbeos_plot_bitmap(x,y,width,height,bitmap,bg,content); + /* Not repeating at all, so just plot it */ + primary = nsbeos_bitmap_get_primary(bitmap); + return nsbeos_plot_bbitmap(x, y, width, height, primary, bg); } if (repeat_x && !repeat_y) -- cgit v1.2.3