From f18943f4ceea491faeee35fb50ff8bc4029c4eb7 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 3 Feb 2010 19:53:45 +0100 Subject: [PATCH] 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 537c0972c1..a8611bf91d 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 22a2780204..9f61ef7d80 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]);