app/gimpimage.h app/gimpimageP.h app/gimpimage.c app/gimage_cmds.c
Sat Nov 14 23:16:55 GMT 1998 Austin Donnelly <austin@greenend.org.uk> * app/gimpimage.h * app/gimpimageP.h * app/gimpimage.c * app/gimage_cmds.c * app/file_new_dialog.c * app/info_window.c * libgimp/gimp.h * libgimp/gimpimage.c * plug-ins/newsprint/newsprint.c * plug-ins/tiff/tiff.c: gimp_image_{get,set}_resolution() calls now get and set both X and Y resolutions. Gimp image struct now has two resolution fields, one for each direction. I've updated the two plugins which used the info (TIFF and newsprint).
This commit is contained in:

committed by
Austin Donnelly

parent
b8b5d7834d
commit
9dd1c38b7f
@ -155,7 +155,8 @@ static void gimp_image_init (GimpImage *gimage)
|
||||
gimage->comp_preview = NULL;
|
||||
gimage->parasites = parasite_list_new();
|
||||
gimp_matrix_identity(gimage->transform);
|
||||
gimage->resolution = 72.0; /* maybe should be rc-supplied default? */
|
||||
gimage->xresolution = 72.0; /* maybe should be rc-supplied default? */
|
||||
gimage->yresolution = 72.0;
|
||||
gimage->save_proc= NULL;
|
||||
}
|
||||
|
||||
@ -301,15 +302,22 @@ gimp_image_set_filename (GimpImage *gimage, char *filename)
|
||||
|
||||
|
||||
void
|
||||
gimp_image_set_resolution (GimpImage *gimage, float resolution)
|
||||
gimp_image_set_resolution (GimpImage *gimage,
|
||||
float xresolution,
|
||||
float yresolution)
|
||||
{
|
||||
gimage->resolution = resolution;
|
||||
gimage->xresolution = xresolution;
|
||||
gimage->yresolution = yresolution;
|
||||
}
|
||||
|
||||
float
|
||||
gimp_image_get_resolution (GimpImage *gimage)
|
||||
void
|
||||
gimp_image_get_resolution (GimpImage *gimage,
|
||||
float *xresolution,
|
||||
float *yresolution)
|
||||
{
|
||||
return gimage->resolution;
|
||||
g_return_if_fail(xresolution && yresolution);
|
||||
*xresolution = gimage->xresolution;
|
||||
*yresolution = gimage->yresolution;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user