mirror of https://github.com/GNOME/gimp.git
take drawable offsets into account when masking the preview with the
2004-10-04 Sven Neumann <sven@gimp.org> * libgimp/gimpdrawablepreview.c (gimp_drawable_preview_draw_area): take drawable offsets into account when masking the preview with the selection mask.
This commit is contained in:
parent
f20872950d
commit
168c5b5a42
|
@ -1,3 +1,9 @@
|
||||||
|
2004-10-04 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* libgimp/gimpdrawablepreview.c (gimp_drawable_preview_draw_area):
|
||||||
|
take drawable offsets into account when masking the preview with
|
||||||
|
the selection mask.
|
||||||
|
|
||||||
2004-10-04 Michael Natterer <mitch@gimp.org>
|
2004-10-04 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* tools/pdbgen/pdb/gimprc.pdb (gimprc_query, gimprc_set): disallow
|
* tools/pdbgen/pdb/gimprc.pdb (gimprc_query, gimprc_set): disallow
|
||||||
|
|
|
@ -236,26 +236,32 @@ gimp_drawable_preview_draw_area (GimpDrawablePreview *preview,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GimpPixelRgn selection_rgn;
|
|
||||||
GimpPixelRgn drawable_rgn;
|
GimpPixelRgn drawable_rgn;
|
||||||
guchar *sel;
|
GimpPixelRgn selection_rgn;
|
||||||
guchar *src;
|
guchar *src;
|
||||||
|
guchar *sel;
|
||||||
|
gint offset_x;
|
||||||
|
gint offset_y;
|
||||||
gint selection_id;
|
gint selection_id;
|
||||||
|
|
||||||
selection_id = gimp_image_get_selection (image_id);
|
selection_id = gimp_image_get_selection (image_id);
|
||||||
|
|
||||||
|
gimp_drawable_offsets (drawable->drawable_id, &offset_x, &offset_y);
|
||||||
|
|
||||||
gimp_pixel_rgn_init (&drawable_rgn, drawable,
|
gimp_pixel_rgn_init (&drawable_rgn, drawable,
|
||||||
x, y, width, height,
|
x, y, width, height,
|
||||||
FALSE, FALSE);
|
FALSE, FALSE);
|
||||||
gimp_pixel_rgn_init (&selection_rgn, gimp_drawable_get (selection_id),
|
gimp_pixel_rgn_init (&selection_rgn, gimp_drawable_get (selection_id),
|
||||||
x, y, width, height,
|
x + offset_x, y + offset_y, width, height,
|
||||||
FALSE, FALSE);
|
FALSE, FALSE);
|
||||||
|
|
||||||
sel = g_new (guchar, width * height);
|
|
||||||
src = g_new (guchar, width * height * drawable->bpp);
|
src = g_new (guchar, width * height * drawable->bpp);
|
||||||
|
sel = g_new (guchar, width * height);
|
||||||
|
|
||||||
gimp_pixel_rgn_get_rect (&drawable_rgn, src, x, y, width, height);
|
gimp_pixel_rgn_get_rect (&drawable_rgn,
|
||||||
gimp_pixel_rgn_get_rect (&selection_rgn, sel, x, y, width, height);
|
src, x, y, width, height);
|
||||||
|
gimp_pixel_rgn_get_rect (&selection_rgn,
|
||||||
|
sel, x + offset_x, y + offset_y, width, height);
|
||||||
|
|
||||||
gimp_preview_area_mask (GIMP_PREVIEW_AREA (gimp_preview->area),
|
gimp_preview_area_mask (GIMP_PREVIEW_AREA (gimp_preview->area),
|
||||||
x - gimp_preview->xoff - gimp_preview->xmin,
|
x - gimp_preview->xoff - gimp_preview->xmin,
|
||||||
|
|
Loading…
Reference in New Issue