From e60e1ccfcb999a8ca3adc16b6797e4526cb9235e Mon Sep 17 00:00:00 2001 From: mh17 <mh17> Date: Thu, 21 Jan 2010 13:39:32 +0000 Subject: [PATCH] screenshot to PDF now runs --- src/zmapWindow/items/zmapWindowLongItem.c | 9 ++++++++- src/zmapWindow/zmapWindowDump.c | 6 ++++-- src/zmapWindow/zmapWindow_P.h | 4 +++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/zmapWindow/items/zmapWindowLongItem.c b/src/zmapWindow/items/zmapWindowLongItem.c index 03e287f6a..aa5cd6ae1 100755 --- a/src/zmapWindow/items/zmapWindowLongItem.c +++ b/src/zmapWindow/items/zmapWindowLongItem.c @@ -29,7 +29,7 @@ * HISTORY: * Last edited: Jul 17 10:37 2009 (rds) * Created: Fri Jan 16 11:20:07 2009 (rds) - * CVS info: $Id: zmapWindowLongItem.c,v 1.1 2009-07-27 03:13:28 rds Exp $ + * CVS info: $Id: zmapWindowLongItem.c,v 1.2 2010-01-21 13:39:33 mh17 Exp $ *------------------------------------------------------------------- */ @@ -132,6 +132,13 @@ double zmapWindowLongItemMaxWindowSize(void) return max; } +// has to be here as the macro is defined in a header internal to this file +// and we need to ask this question from zmapWindowDump.c +int zmapWindowIsLongItem(FooCanvasItem *foo) +{ + return(ZMAP_IS_WINDOW_LONG_ITEM(foo)); +} + static void get_points_extent_box(FooCanvasPoints *points, double *x1_out, double *y1_out, double *x2_out, double *y2_out) diff --git a/src/zmapWindow/zmapWindowDump.c b/src/zmapWindow/zmapWindowDump.c index 0aef595a5..e8a395e60 100755 --- a/src/zmapWindow/zmapWindowDump.c +++ b/src/zmapWindow/zmapWindowDump.c @@ -29,7 +29,7 @@ * HISTORY: * Last edited: Jun 19 13:38 2009 (rds) * Created: Thu Mar 30 16:48:34 2006 (edgrif) - * CVS info: $Id: zmapWindowDump.c,v 1.9 2009-07-27 03:15:12 rds Exp $ + * CVS info: $Id: zmapWindowDump.c,v 1.10 2010-01-21 13:39:32 mh17 Exp $ *------------------------------------------------------------------- */ @@ -788,7 +788,8 @@ static void dumpFeature(FooCanvasItem *item, gpointer user_data) if (zmapWindowItemIsShown(item) && ((type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(item), ITEM_FEATURE_TYPE))) != 7) - && (!(type == 2 && !FOO_IS_CANVAS_LINE(item)))) + && (!(type == 2 && !FOO_IS_CANVAS_LINE(item))) + && !zmapWindowIsLongItem(item)) { guint composite ; int fill_colour = 0 ; /* default to white. */ @@ -904,6 +905,7 @@ static void dumpFeature(FooCanvasItem *item, gpointer user_data) } else { +// zMapLogMessage("Unexpected item [%s]", G_OBJECT_TYPE_NAME(item)); zMapAssertNotReached() ; } } diff --git a/src/zmapWindow/zmapWindow_P.h b/src/zmapWindow/zmapWindow_P.h index b3683a0f1..ae65075dc 100755 --- a/src/zmapWindow/zmapWindow_P.h +++ b/src/zmapWindow/zmapWindow_P.h @@ -27,7 +27,7 @@ * HISTORY: * Last edited: Oct 14 11:57 2009 (edgrif) * Created: Fri Aug 1 16:45:58 2003 (edgrif) - * CVS info: $Id: zmapWindow_P.h,v 1.248 2010-01-20 15:35:45 mh17 Exp $ + * CVS info: $Id: zmapWindow_P.h,v 1.249 2010-01-21 13:39:32 mh17 Exp $ *------------------------------------------------------------------- */ #ifndef ZMAP_WINDOW_P_H @@ -770,6 +770,8 @@ void zmapWindowLongItemPrint(ZMapWindowLongItems long_items) ; void zmapWindowLongItemFree(ZMapWindowLongItems long_items) ; void zmapWindowLongItemDestroy(ZMapWindowLongItems long_item) ; +int zmapWindowIsLongItem(FooCanvasItem *foo); + void zmapWindowDrawFeatures(ZMapWindow window, ZMapFeatureContext current_context, ZMapFeatureContext new_context) ; void zmapWindowreDrawContainerExecute(ZMapWindow window, -- GitLab