[project @ 2006-03-25 23:53:34 by rjek]

Misc GTK thumbnailing fixes

svn path=/import/netsurf/; revision=2167
This commit is contained in:
Rob Kendrick 2006-03-25 23:53:34 +00:00
parent b82d35b061
commit 556072e994
4 changed files with 6 additions and 6 deletions

View File

@ -40,12 +40,9 @@ static bool nsgtk_plot_bitmap_tile(int x, int y, int width, int height,
bool repeat_x, bool repeat_y);
static bool nsgtk_plot_group_start(const char *name);
static bool nsgtk_plot_group_end(void);
static void nsgtk_set_colour(colour c);
static void nsgtk_set_solid(void); /**< Set for drawing solid lines */
static void nsgtk_set_dotted(void); /**< Set for drawing dotted lines */
static void nsgtk_set_dashed(void); /**< Set for drawing dashed lines */
void nsgtk_plot_set_scale(float s);
float nsgtk_plot_get_scale(void);
static GdkRectangle cliprect;
static float nsgtk_plot_scale = 1.0;

View File

@ -40,7 +40,7 @@ bool thumbnail_create(struct content *content, struct bitmap *bitmap,
gint height = gdk_pixbuf_get_height(pixbuf);
gint depth = (gdk_screen_get_system_visual(gdk_screen_get_default()))->depth;
GdkPixmap *pixmap = gdk_pixmap_new(NULL, width, height, depth);
GdkColor c = { 0, 65535, 65535, 65535 };
GdkColor c = { 0xffffff, 65535, 65535, 65535 };
float scale = 1.0;
assert(content);
@ -58,9 +58,12 @@ bool thumbnail_create(struct content *content, struct bitmap *bitmap,
/* set to plot to pixmap */
current_drawable = pixmap;
current_gc = gdk_gc_new(current_drawable);
gdk_gc_set_foreground(current_gc, &c);
#ifdef CAIRO_VERSION
current_cr = gdk_cairo_create(current_drawable);
cairo_set_source_rgba(current_cr, 1, 1, 1, 1);
#endif
gdk_draw_rectangle(pixmap, current_gc, TRUE, 0, 0, width, height);
/* render the content */
content_redraw(content, 0, 0, width, height,

View File

@ -17,4 +17,4 @@ extern cairo_t *current_cr;
void nsgtk_plot_set_scale(float s);
float nsgtk_plot_get_scale(void);
void nsgtk_set_colour(colour c);

View File

@ -65,7 +65,7 @@ OBJECTS_GTK += filetyped.o # debug/
OBJECTS_GTK += browser.o history_core.o netsurf.o selection.o textinput.o \
version.o # desktop/
OBJECTS_GTK += font_pango.o gtk_bitmap.o gtk_gui.o \
gtk_schedule.o \
gtk_schedule.o gtk_thumbnail.o \
gtk_plotters.o gtk_treeview.o gtk_window.o # gtk/