[gimp] Don't access the image's unit and resolution members directly



commit f18943f4ceea491faeee35fb50ff8bc4029c4eb7
Author: Michael Natterer <mitch gimp org>
Date:   Wed Feb 3 19:53:45 2010 +0100

    Don't access the image's unit and resolution members directly

 app/core/gimpdrawable-stroke.c |    2 +-
 app/xcf/xcf-load.c             |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpdrawable-stroke.c b/app/core/gimpdrawable-stroke.c
index 537c097..a8611bf 100644
--- a/app/core/gimpdrawable-stroke.c
+++ b/app/core/gimpdrawable-stroke.c
@@ -358,7 +358,7 @@ gimp_drawable_stroke_scan_convert (GimpDrawable    *drawable,
 
           gimp_scan_convert_set_pixel_ratio (scan_convert, yres / xres);
 
-          width *= (image->yresolution /
+          width *= (yres /
                     _gimp_unit_get_factor (image->gimp, stroke_options->unit));
         }
 
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index 22a2780..9f61ef7 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -570,7 +570,7 @@ xcf_load_image_props (XcfInfo   *info,
                 unit = GIMP_UNIT_INCH;
               }
 
-            image->resolution_unit = unit;
+            gimp_image_set_unit (image, unit);
           }
           break;
 
@@ -624,7 +624,7 @@ xcf_load_image_props (XcfInfo   *info,
                                      unit_strings[3],
                                      unit_strings[4]);
 
-            image->resolution_unit = unit;
+            gimp_image_set_unit (image, unit);
 
             for (i = 0; i < 5; i++)
               g_free (unit_strings[i]);



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