Index: tools/abigochart/unix/AbiGOChart.cpp =================================================================== RCS file: /cvsroot/abiword-plugins/tools/abigochart/unix/AbiGOChart.cpp,v retrieving revision 1.19 diff -u -5 -r1.19 AbiGOChart.cpp --- tools/abigochart/unix/AbiGOChart.cpp 17 Nov 2005 11:01:04 -0000 1.19 +++ tools/abigochart/unix/AbiGOChart.cpp 19 Nov 2005 16:36:55 -0000 @@ -1116,26 +1116,32 @@ // // scale_ydir fixes this (and gets the landscape/portrait right // too). // y = pUGG->scale_ydir(y); - printf("print chart - x %d,y %d,width %d,height %d \n",x,y,myWidth,myHeight); gnome_print_gsave (ctx); gnome_print_translate (ctx, x, y+myHeight); gog_graph_print_to_gnome_print(m_Graph,ctx,myWidth,myHeight); gnome_print_grestore(ctx); } else { - GdkPixbuf *pixbuf; - if (rec.height != height || rec.width != width || (height == 0) || (width == 0)) + GR_Graphics *pUGG = m_pGOMan->getGraphics(); + UT_sint32 _width = pUGG->tdu(rec.width); + UT_sint32 _height = pUGG->tdu(rec.height); + UT_sint32 x = pUGG->tdu(rec.left); + UT_sint32 y = pUGG->tdu(rec.top); + double zoom = (double) pUGG->getZoomPercentage () / 100.; + if (_width != width || _height != height) { GdkPixbuf *pixbuf; - width = rec.width; - height = rec.height; - gog_renderer_pixbuf_update (GOG_RENDERER_PIXBUF (m_Renderer), width, height, 1.0); + width = _width; + height = _height; + _width = (UT_sint32) ((double) width * zoom); + _height = (UT_sint32) ((double) height * zoom); + gog_renderer_pixbuf_update (GOG_RENDERER_PIXBUF (m_Renderer), _width, _height, zoom); if (m_Image) delete m_Image; gsize length; pixbuf = gog_renderer_pixbuf_get (GOG_RENDERER_PIXBUF (m_Renderer)); m_Image = new GR_UnixImage(NULL, pixbuf);