app/actions/channels-commands.c app/actions/colormap-actions.c

2007-12-25  Michael Natterer  <mitch@gimp.org>

	* app/actions/channels-commands.c
	* app/actions/colormap-actions.c
	* app/actions/colormap-commands.c
	* app/actions/image-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpimage-colorhash.c
	* app/core/gimpimage-colormap.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-preview.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-sample-points.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-snap.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimpimageundo.c
	* app/core/gimpitem-preview.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimppalette-import.c
	* app/core/gimpprojection-construct.c
	* app/core/gimpprojection.c
	* app/core/gimpselection.c
	* app/core/gimpundo.c
	* app/dialogs/layer-options-dialog.c
	* app/dialogs/print-size-dialog.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-scroll.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpstatusbar.c
	* app/file/file-open.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprotatetool.c
	* app/vectors/gimpvectors-export.c
	* app/vectors/gimpvectors-import.c
	* app/vectors/gimpvectors.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimpnavigationview.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrendererimage.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/guides.pdb
	* tools/pdbgen/pdb/image.pdb: use accessors for many image properties.

	* app/pdb/guides_cmds.c
	* app/pdb/image_cmds.c: regenerated.


svn path=/trunk/; revision=24432
This commit is contained in:
Michael Natterer
2007-12-25 16:21:40 +00:00
committed by Michael Natterer
parent 9b551273ab
commit 75061fccfd
69 changed files with 646 additions and 444 deletions

View File

@ -64,8 +64,9 @@ gimp_image_duplicate (GimpImage *image)
/* Create a new image */
new_image = gimp_create_image (image->gimp,
image->width, image->height,
image->base_type,
gimp_image_get_width (image),
gimp_image_get_height (image),
gimp_image_base_type (image),
FALSE);
gimp_image_undo_disable (new_image);
@ -80,7 +81,7 @@ gimp_image_duplicate (GimpImage *image)
}
/* Copy the colormap if necessary */
if (new_image->base_type == GIMP_INDEXED)
if (gimp_image_base_type (new_image) == GIMP_INDEXED)
gimp_image_set_colormap (new_image,
gimp_image_get_colormap (image),
gimp_image_get_colormap_size (image),
@ -89,7 +90,7 @@ gimp_image_duplicate (GimpImage *image)
/* Copy resolution information */
new_image->xresolution = image->xresolution;
new_image->yresolution = image->yresolution;
new_image->resolution_unit = image->resolution_unit;
new_image->resolution_unit = gimp_image_get_unit (image);
/* Copy floating layer */
floating_layer = gimp_image_floating_sel (image);
@ -196,14 +197,20 @@ gimp_image_duplicate (GimpImage *image)
PixelRegion srcPR, destPR;
src_tiles =
gimp_drawable_get_tiles (GIMP_DRAWABLE (image->selection_mask));
gimp_drawable_get_tiles (GIMP_DRAWABLE (gimp_image_get_mask (image)));
dest_tiles =
gimp_drawable_get_tiles (GIMP_DRAWABLE (new_image->selection_mask));
gimp_drawable_get_tiles (GIMP_DRAWABLE (gimp_image_get_mask (new_image)));
pixel_region_init (&srcPR, src_tiles,
0, 0, image->width, image->height, FALSE);
0, 0,
gimp_image_get_width (image),
gimp_image_get_height (image),
FALSE);
pixel_region_init (&destPR, dest_tiles,
0, 0, image->width, image->height, TRUE);
0, 0,
gimp_image_get_width (image),
gimp_image_get_height (image),
TRUE);
copy_region (&srcPR, &destPR);