diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2009-06-30 13:02:23 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2009-06-30 13:02:23 +0000 |
commit | aa2684341170424783f9937d8fe441fb3984d825 (patch) | |
tree | b7b1adaf3867666f15d7bf9bacf804846372eff7 /beos/beos_plotters.cpp | |
parent | 38356d46ff15fe669c59bdf6aa96b7f4248d1b6a (diff) | |
download | netsurf-aa2684341170424783f9937d8fe441fb3984d825.tar.gz netsurf-aa2684341170424783f9937d8fe441fb3984d825.tar.bz2 |
Improve bitmap plotter API
svn path=/trunk/netsurf/; revision=8195
Diffstat (limited to 'beos/beos_plotters.cpp')
-rw-r--r-- | beos/beos_plotters.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
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) |