gimp r27434 - in trunk: . app/text



Author: neo
Date: Mon Oct 27 08:15:06 2008
New Revision: 27434
URL: http://svn.gnome.org/viewvc/gimp?rev=27434&view=rev

Log:
2008-10-27  Sven Neumann  <sven gimp org>

	* app/text/gimptextlayout-render.c 
(gimp_text_layout_render_trafo):
	minor cleanup.



Modified:
   trunk/ChangeLog
   trunk/app/text/gimptextlayout-render.c

Modified: trunk/app/text/gimptextlayout-render.c
==============================================================================
--- trunk/app/text/gimptextlayout-render.c	(original)
+++ trunk/app/text/gimptextlayout-render.c	Mon Oct 27 08:15:06 2008
@@ -234,11 +234,12 @@
 gimp_text_layout_render_trafo (GimpTextLayout *layout,
                                cairo_matrix_t *trafo)
 {
-  GimpText *text = layout->text;
+  GimpText      *text = layout->text;
+  const gdouble  norm = 1.0 / layout->yres * layout->xres;
 
-  trafo->xx = text->transformation.coeff[0][0] * 1.0 / layout->yres * layout->xres;
+  trafo->xx = text->transformation.coeff[0][0] * norm;
   trafo->xy = text->transformation.coeff[0][1] * 1.0;
-  trafo->yx = text->transformation.coeff[1][0] * 1.0 / layout->yres * layout->xres;
+  trafo->yx = text->transformation.coeff[1][0] * norm;
   trafo->yy = text->transformation.coeff[1][1] * 1.0;
   trafo->x0 = 0;
   trafo->y0 = 0;



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