[gimp/gimp-2-6] initialize all fields of GimpCoords



commit a569d60d89de2f9f7fbfd3084cd4b8f466ba9d9e
Author: Massimo Valentini <sixtysix inwind it>
Date:   Mon Dec 14 20:32:42 2009 +0100

    initialize all fields of GimpCoords

 app/text/gimptext-vectors.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/app/text/gimptext-vectors.c b/app/text/gimptext-vectors.c
index c8dc952..6d3d0f1 100644
--- a/app/text/gimptext-vectors.c
+++ b/app/text/gimptext-vectors.c
@@ -111,12 +111,11 @@ gimp_text_vector_coords (RenderContext   *context,
                          const FT_Vector *vector,
                          GimpCoords      *coords)
 {
-  coords->x        = context->offset_x + (gdouble) vector->x / 64.0;
-  coords->y        = context->offset_y - (gdouble) vector->y / 64.0;
-  coords->pressure = GIMP_COORDS_DEFAULT_PRESSURE;
-  coords->xtilt    = GIMP_COORDS_DEFAULT_TILT;
-  coords->ytilt    = GIMP_COORDS_DEFAULT_TILT;
-  coords->wheel    = GIMP_COORDS_DEFAULT_WHEEL;
+  const GimpCoords default_values = GIMP_COORDS_DEFAULT_VALUES;
+
+  *coords   = default_values;
+  coords->x = context->offset_x + (gdouble) vector->x / 64.0;
+  coords->y = context->offset_y - (gdouble) vector->y / 64.0;
 }
 
 static gint



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