goffice r2109 - in trunk: . goffice/graph



Author: jody
Date: Tue Jun 17 22:08:21 2008
New Revision: 2109
URL: http://svn.gnome.org/viewvc/goffice?rev=2109&view=rev

Log:
2008-06-17  Jody Goldberg <jody gnome org>

	* goffice/graph/gog-renderer.c (gog_renderer_draw_text) : Use the same
	  size handling as get_text_OBR. [#442773]


Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/goffice/graph/gog-renderer.c

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Tue Jun 17 22:08:21 2008
@@ -6,6 +6,9 @@
 	* Fixed plot types activation/deactivation issues.
 	* Always use full lines when drawing markers. [#536276]
 
+Jody:
+	* Fix X axis text clipping on win32. [#442773]
+
 Rob Staudinger:
 	* Use plain menu items for toolbar overflow image menu item proxies, 
 	so they are displayed correctly with gtk-menu-images=0. [#537541]

Modified: trunk/goffice/graph/gog-renderer.c
==============================================================================
--- trunk/goffice/graph/gog-renderer.c	(original)
+++ trunk/goffice/graph/gog-renderer.c	Tue Jun 17 22:08:21 2008
@@ -1093,8 +1093,8 @@
 	pango_layout_set_font_description (layout, style->font.font->desc);
 	pango_layout_get_size (layout, &iw, &ih);
 
-	obr.w = rend->scale * (iw / (double)PANGO_SCALE);
-	obr.h = rend->scale * (ih / (double)PANGO_SCALE);
+	obr.w = rend->scale * ((double) iw + (double) PANGO_SCALE / 2.0) / (double) PANGO_SCALE;
+	obr.h = rend->scale * ((double) ih + (double) PANGO_SCALE / 2.0) /(double) PANGO_SCALE;
 	obr.alpha = -style->text_layout.angle * M_PI / 180.0;
 	obr.x = pos->x;
 	obr.y = pos->y;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]