From 8cf870c27718e7fa8f3cbe57c839e7ae90635c0d Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 24 Apr 2002 21:39:24 +0000 Subject: implement printing (pixbuf_print_height): implement print height 2002-04-24 JP Rosevear * e-cell-pixbuf.c (pixbuf_print): implement printing (pixbuf_print_height): implement print height (e_cell_pixbuf_class_init): set printing virtual methods * e-cell-toggle.c (etog_print): remove clipping, default clipping is done by the table, scale based on toggle height * e-table-item.c (e_table_item_calculate_print_widths): make the scale 1:1 svn path=/trunk/; revision=16577 --- widgets/table/e-cell-toggle.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'widgets/table/e-cell-toggle.c') diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c index 269cddc0a4..4458605e6d 100644 --- a/widgets/table/e-cell-toggle.c +++ b/widgets/table/e-cell-toggle.c @@ -311,7 +311,6 @@ etog_print (ECellView *ecell_view, GnomePrintContext *context, { ECellToggle *toggle = E_CELL_TOGGLE(ecell_view->ecell); GdkPixbuf *image; - int scale; const int value = GPOINTER_TO_INT ( e_table_model_value_at (ecell_view->e_table_model, model_col, row)); @@ -323,24 +322,10 @@ etog_print (ECellView *ecell_view, GnomePrintContext *context, gnome_print_gsave(context); - if (gnome_print_moveto(context, 2, 2) == -1) - /* FIXME */; - if (gnome_print_lineto(context, width - 2, 2) == -1) - /* FIXME */; - if (gnome_print_lineto(context, width - 2, height - 2) == -1) - /* FIXME */; - if (gnome_print_lineto(context, 2, height - 2) == -1) - /* FIXME */; - if (gnome_print_lineto(context, 2, 2) == -1) - /* FIXME */; - if (gnome_print_clip(context) == -1) - /* FIXME */; - image = toggle->images[value]; - scale = MIN (width - 4, height - 4); - gnome_print_translate (context, 2, (height - scale) / 2); - gnome_print_scale (context, scale, scale); + gnome_print_translate (context, 0, (height - toggle->height) / 2); + gnome_print_scale (context, toggle->height, toggle->height); gnome_print_pixbuf (context, image); gnome_print_grestore(context); -- cgit v1.2.3