[gimp] initialize all fields of GimpCoords (based on a patch by Massimo)



commit cfc3c4c69345e2ef98f3d727152c05f5c9cfa4c2
Author: Sven Neumann <sven gimp org>
Date:   Mon Dec 14 20:28:47 2009 +0100

    initialize all fields of GimpCoords (based on a patch by Massimo)

 app/text/gimptext-vectors.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/app/text/gimptext-vectors.c b/app/text/gimptext-vectors.c
index 4bb44f6..21ae7d3 100644
--- a/app/text/gimptext-vectors.c
+++ b/app/text/gimptext-vectors.c
@@ -103,12 +103,12 @@ gimp_text_vector_coords (const double  x,
                          const double  y,
                          GimpCoords   *coords)
 {
-  coords->x        = x;
-  coords->y        = y;
-  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 = x;
+  coords->y = y;
 }
 
 static gint



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