mirror of https://github.com/GNOME/gimp.git
pixmaps/Makefile.am new pixmap. "Someone" needs to go over the pixmaps one
2001-03-12 Michael Natterer <mitch@gimp.org> * pixmaps/Makefile.am * pixmaps/edit.xpm: new pixmap. "Someone" needs to go over the pixmaps one day ;) * app/gimpdatafactoryview.c * app/gimpdrawablelistview.c: use the new icon. * app/floating_sel.c: stupid: the new gimp_layer_get_opacity() accessor speaks in normalized [0.0..1.0] values, so the floating selection was invisible after blindly using it. * app/gimpimage.c: more stupid: a totally useless sanity clamping made the composite preview ugly. Fixed. * app/tools/tool_manager.c: why the heck did this never crash before: don't dereference a NULL GDisplay pointer.
This commit is contained in:
parent
7857ea7cf8
commit
16fa029b28
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
||||||
|
2001-03-12 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* pixmaps/Makefile.am
|
||||||
|
* pixmaps/edit.xpm: new pixmap. "Someone" needs to go over the
|
||||||
|
pixmaps one day ;)
|
||||||
|
|
||||||
|
* app/gimpdatafactoryview.c
|
||||||
|
* app/gimpdrawablelistview.c: use the new icon.
|
||||||
|
|
||||||
|
* app/floating_sel.c: stupid: the new gimp_layer_get_opacity()
|
||||||
|
accessor speaks in normalized [0.0..1.0] values, so the
|
||||||
|
floating selection was invisible after blindly using it.
|
||||||
|
|
||||||
|
* app/gimpimage.c: more stupid: a totally useless sanity clamping
|
||||||
|
made the composite preview ugly. Fixed.
|
||||||
|
|
||||||
|
* app/tools/tool_manager.c: why the heck did this never crash before:
|
||||||
|
don't dereference a NULL GDisplay pointer.
|
||||||
|
|
||||||
2001-03-11 Seth Burgess <sjburges@gimp.org>
|
2001-03-11 Seth Burgess <sjburges@gimp.org>
|
||||||
|
|
||||||
* app/tools/Makefile.am
|
* app/tools/Makefile.am
|
||||||
|
|
|
@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
||||||
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
||||||
|
|
||||||
w = MAX (1, width);
|
|
||||||
h = MAX (1, height);
|
|
||||||
|
|
||||||
x1 = CLAMP (x, 0, width);
|
x1 = CLAMP (x, 0, width);
|
||||||
y1 = CLAMP (y, 0, height);
|
y1 = CLAMP (y, 0, height);
|
||||||
x2 = CLAMP (x + w, 0, width);
|
x2 = CLAMP (x + w, 0, width);
|
||||||
|
@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src1PR.w = (x2 - x1);
|
src1PR.w = (x2 - x1);
|
||||||
src1PR.h = (y2 - y1);
|
src1PR.h = (y2 - y1);
|
||||||
src1PR.rowstride = comp->width * src1PR.bytes;
|
src1PR.rowstride = comp->width * src1PR.bytes;
|
||||||
src1PR.data =
|
src1PR.data = (temp_buf_data (comp) +
|
||||||
temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes;
|
y1 * src1PR.rowstride + x1 * src1PR.bytes);
|
||||||
|
|
||||||
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
||||||
src2PR.bytes = layer_buf->bytes;
|
src2PR.bytes = layer_buf->bytes;
|
||||||
|
@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src2PR.x = src1PR.x;
|
src2PR.x = src1PR.x;
|
||||||
src2PR.y = src1PR.y;
|
src2PR.y = src1PR.y;
|
||||||
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
||||||
src2PR.data = temp_buf_data (layer_buf) +
|
src2PR.data = (temp_buf_data (layer_buf) +
|
||||||
(y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes;
|
(y1 - y) * src2PR.rowstride +
|
||||||
|
(x1 - x) * src2PR.bytes);
|
||||||
|
|
||||||
if (layer->mask && layer->mask->apply_mask)
|
if (layer->mask && layer->mask->apply_mask)
|
||||||
{
|
{
|
||||||
|
@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w, h);
|
w, h);
|
||||||
maskPR.bytes = mask_buf->bytes;
|
maskPR.bytes = mask_buf->bytes;
|
||||||
maskPR.rowstride = mask_buf->width;
|
maskPR.rowstride = mask_buf->width;
|
||||||
maskPR.data = mask_buf_data (mask_buf) +
|
maskPR.data = (mask_buf_data (mask_buf) +
|
||||||
(y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes;
|
(y1 - y) * maskPR.rowstride +
|
||||||
|
(x1 - x) * maskPR.bytes);
|
||||||
mask = &maskPR;
|
mask = &maskPR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
||||||
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
||||||
|
|
||||||
w = MAX (1, width);
|
|
||||||
h = MAX (1, height);
|
|
||||||
|
|
||||||
x1 = CLAMP (x, 0, width);
|
x1 = CLAMP (x, 0, width);
|
||||||
y1 = CLAMP (y, 0, height);
|
y1 = CLAMP (y, 0, height);
|
||||||
x2 = CLAMP (x + w, 0, width);
|
x2 = CLAMP (x + w, 0, width);
|
||||||
|
@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src1PR.w = (x2 - x1);
|
src1PR.w = (x2 - x1);
|
||||||
src1PR.h = (y2 - y1);
|
src1PR.h = (y2 - y1);
|
||||||
src1PR.rowstride = comp->width * src1PR.bytes;
|
src1PR.rowstride = comp->width * src1PR.bytes;
|
||||||
src1PR.data =
|
src1PR.data = (temp_buf_data (comp) +
|
||||||
temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes;
|
y1 * src1PR.rowstride + x1 * src1PR.bytes);
|
||||||
|
|
||||||
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
||||||
src2PR.bytes = layer_buf->bytes;
|
src2PR.bytes = layer_buf->bytes;
|
||||||
|
@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src2PR.x = src1PR.x;
|
src2PR.x = src1PR.x;
|
||||||
src2PR.y = src1PR.y;
|
src2PR.y = src1PR.y;
|
||||||
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
||||||
src2PR.data = temp_buf_data (layer_buf) +
|
src2PR.data = (temp_buf_data (layer_buf) +
|
||||||
(y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes;
|
(y1 - y) * src2PR.rowstride +
|
||||||
|
(x1 - x) * src2PR.bytes);
|
||||||
|
|
||||||
if (layer->mask && layer->mask->apply_mask)
|
if (layer->mask && layer->mask->apply_mask)
|
||||||
{
|
{
|
||||||
|
@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w, h);
|
w, h);
|
||||||
maskPR.bytes = mask_buf->bytes;
|
maskPR.bytes = mask_buf->bytes;
|
||||||
maskPR.rowstride = mask_buf->width;
|
maskPR.rowstride = mask_buf->width;
|
||||||
maskPR.data = mask_buf_data (mask_buf) +
|
maskPR.data = (mask_buf_data (mask_buf) +
|
||||||
(y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes;
|
(y1 - y) * maskPR.rowstride +
|
||||||
|
(x1 - x) * maskPR.bytes);
|
||||||
mask = &maskPR;
|
mask = &maskPR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
||||||
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
||||||
|
|
||||||
w = MAX (1, width);
|
|
||||||
h = MAX (1, height);
|
|
||||||
|
|
||||||
x1 = CLAMP (x, 0, width);
|
x1 = CLAMP (x, 0, width);
|
||||||
y1 = CLAMP (y, 0, height);
|
y1 = CLAMP (y, 0, height);
|
||||||
x2 = CLAMP (x + w, 0, width);
|
x2 = CLAMP (x + w, 0, width);
|
||||||
|
@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src1PR.w = (x2 - x1);
|
src1PR.w = (x2 - x1);
|
||||||
src1PR.h = (y2 - y1);
|
src1PR.h = (y2 - y1);
|
||||||
src1PR.rowstride = comp->width * src1PR.bytes;
|
src1PR.rowstride = comp->width * src1PR.bytes;
|
||||||
src1PR.data =
|
src1PR.data = (temp_buf_data (comp) +
|
||||||
temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes;
|
y1 * src1PR.rowstride + x1 * src1PR.bytes);
|
||||||
|
|
||||||
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
||||||
src2PR.bytes = layer_buf->bytes;
|
src2PR.bytes = layer_buf->bytes;
|
||||||
|
@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src2PR.x = src1PR.x;
|
src2PR.x = src1PR.x;
|
||||||
src2PR.y = src1PR.y;
|
src2PR.y = src1PR.y;
|
||||||
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
||||||
src2PR.data = temp_buf_data (layer_buf) +
|
src2PR.data = (temp_buf_data (layer_buf) +
|
||||||
(y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes;
|
(y1 - y) * src2PR.rowstride +
|
||||||
|
(x1 - x) * src2PR.bytes);
|
||||||
|
|
||||||
if (layer->mask && layer->mask->apply_mask)
|
if (layer->mask && layer->mask->apply_mask)
|
||||||
{
|
{
|
||||||
|
@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w, h);
|
w, h);
|
||||||
maskPR.bytes = mask_buf->bytes;
|
maskPR.bytes = mask_buf->bytes;
|
||||||
maskPR.rowstride = mask_buf->width;
|
maskPR.rowstride = mask_buf->width;
|
||||||
maskPR.data = mask_buf_data (mask_buf) +
|
maskPR.data = (mask_buf_data (mask_buf) +
|
||||||
(y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes;
|
(y1 - y) * maskPR.rowstride +
|
||||||
|
(x1 - x) * maskPR.bytes);
|
||||||
mask = &maskPR;
|
mask = &maskPR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
||||||
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
||||||
|
|
||||||
w = MAX (1, width);
|
|
||||||
h = MAX (1, height);
|
|
||||||
|
|
||||||
x1 = CLAMP (x, 0, width);
|
x1 = CLAMP (x, 0, width);
|
||||||
y1 = CLAMP (y, 0, height);
|
y1 = CLAMP (y, 0, height);
|
||||||
x2 = CLAMP (x + w, 0, width);
|
x2 = CLAMP (x + w, 0, width);
|
||||||
|
@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src1PR.w = (x2 - x1);
|
src1PR.w = (x2 - x1);
|
||||||
src1PR.h = (y2 - y1);
|
src1PR.h = (y2 - y1);
|
||||||
src1PR.rowstride = comp->width * src1PR.bytes;
|
src1PR.rowstride = comp->width * src1PR.bytes;
|
||||||
src1PR.data =
|
src1PR.data = (temp_buf_data (comp) +
|
||||||
temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes;
|
y1 * src1PR.rowstride + x1 * src1PR.bytes);
|
||||||
|
|
||||||
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
||||||
src2PR.bytes = layer_buf->bytes;
|
src2PR.bytes = layer_buf->bytes;
|
||||||
|
@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src2PR.x = src1PR.x;
|
src2PR.x = src1PR.x;
|
||||||
src2PR.y = src1PR.y;
|
src2PR.y = src1PR.y;
|
||||||
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
||||||
src2PR.data = temp_buf_data (layer_buf) +
|
src2PR.data = (temp_buf_data (layer_buf) +
|
||||||
(y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes;
|
(y1 - y) * src2PR.rowstride +
|
||||||
|
(x1 - x) * src2PR.bytes);
|
||||||
|
|
||||||
if (layer->mask && layer->mask->apply_mask)
|
if (layer->mask && layer->mask->apply_mask)
|
||||||
{
|
{
|
||||||
|
@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w, h);
|
w, h);
|
||||||
maskPR.bytes = mask_buf->bytes;
|
maskPR.bytes = mask_buf->bytes;
|
||||||
maskPR.rowstride = mask_buf->width;
|
maskPR.rowstride = mask_buf->width;
|
||||||
maskPR.data = mask_buf_data (mask_buf) +
|
maskPR.data = (mask_buf_data (mask_buf) +
|
||||||
(y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes;
|
(y1 - y) * maskPR.rowstride +
|
||||||
|
(x1 - x) * maskPR.bytes);
|
||||||
mask = &maskPR;
|
mask = &maskPR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
||||||
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
||||||
|
|
||||||
w = MAX (1, width);
|
|
||||||
h = MAX (1, height);
|
|
||||||
|
|
||||||
x1 = CLAMP (x, 0, width);
|
x1 = CLAMP (x, 0, width);
|
||||||
y1 = CLAMP (y, 0, height);
|
y1 = CLAMP (y, 0, height);
|
||||||
x2 = CLAMP (x + w, 0, width);
|
x2 = CLAMP (x + w, 0, width);
|
||||||
|
@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src1PR.w = (x2 - x1);
|
src1PR.w = (x2 - x1);
|
||||||
src1PR.h = (y2 - y1);
|
src1PR.h = (y2 - y1);
|
||||||
src1PR.rowstride = comp->width * src1PR.bytes;
|
src1PR.rowstride = comp->width * src1PR.bytes;
|
||||||
src1PR.data =
|
src1PR.data = (temp_buf_data (comp) +
|
||||||
temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes;
|
y1 * src1PR.rowstride + x1 * src1PR.bytes);
|
||||||
|
|
||||||
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
||||||
src2PR.bytes = layer_buf->bytes;
|
src2PR.bytes = layer_buf->bytes;
|
||||||
|
@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src2PR.x = src1PR.x;
|
src2PR.x = src1PR.x;
|
||||||
src2PR.y = src1PR.y;
|
src2PR.y = src1PR.y;
|
||||||
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
||||||
src2PR.data = temp_buf_data (layer_buf) +
|
src2PR.data = (temp_buf_data (layer_buf) +
|
||||||
(y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes;
|
(y1 - y) * src2PR.rowstride +
|
||||||
|
(x1 - x) * src2PR.bytes);
|
||||||
|
|
||||||
if (layer->mask && layer->mask->apply_mask)
|
if (layer->mask && layer->mask->apply_mask)
|
||||||
{
|
{
|
||||||
|
@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w, h);
|
w, h);
|
||||||
maskPR.bytes = mask_buf->bytes;
|
maskPR.bytes = mask_buf->bytes;
|
||||||
maskPR.rowstride = mask_buf->width;
|
maskPR.rowstride = mask_buf->width;
|
||||||
maskPR.data = mask_buf_data (mask_buf) +
|
maskPR.data = (mask_buf_data (mask_buf) +
|
||||||
(y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes;
|
(y1 - y) * maskPR.rowstride +
|
||||||
|
(x1 - x) * maskPR.bytes);
|
||||||
mask = &maskPR;
|
mask = &maskPR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
||||||
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
||||||
|
|
||||||
w = MAX (1, width);
|
|
||||||
h = MAX (1, height);
|
|
||||||
|
|
||||||
x1 = CLAMP (x, 0, width);
|
x1 = CLAMP (x, 0, width);
|
||||||
y1 = CLAMP (y, 0, height);
|
y1 = CLAMP (y, 0, height);
|
||||||
x2 = CLAMP (x + w, 0, width);
|
x2 = CLAMP (x + w, 0, width);
|
||||||
|
@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src1PR.w = (x2 - x1);
|
src1PR.w = (x2 - x1);
|
||||||
src1PR.h = (y2 - y1);
|
src1PR.h = (y2 - y1);
|
||||||
src1PR.rowstride = comp->width * src1PR.bytes;
|
src1PR.rowstride = comp->width * src1PR.bytes;
|
||||||
src1PR.data =
|
src1PR.data = (temp_buf_data (comp) +
|
||||||
temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes;
|
y1 * src1PR.rowstride + x1 * src1PR.bytes);
|
||||||
|
|
||||||
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
||||||
src2PR.bytes = layer_buf->bytes;
|
src2PR.bytes = layer_buf->bytes;
|
||||||
|
@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src2PR.x = src1PR.x;
|
src2PR.x = src1PR.x;
|
||||||
src2PR.y = src1PR.y;
|
src2PR.y = src1PR.y;
|
||||||
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
||||||
src2PR.data = temp_buf_data (layer_buf) +
|
src2PR.data = (temp_buf_data (layer_buf) +
|
||||||
(y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes;
|
(y1 - y) * src2PR.rowstride +
|
||||||
|
(x1 - x) * src2PR.bytes);
|
||||||
|
|
||||||
if (layer->mask && layer->mask->apply_mask)
|
if (layer->mask && layer->mask->apply_mask)
|
||||||
{
|
{
|
||||||
|
@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w, h);
|
w, h);
|
||||||
maskPR.bytes = mask_buf->bytes;
|
maskPR.bytes = mask_buf->bytes;
|
||||||
maskPR.rowstride = mask_buf->width;
|
maskPR.rowstride = mask_buf->width;
|
||||||
maskPR.data = mask_buf_data (mask_buf) +
|
maskPR.data = (mask_buf_data (mask_buf) +
|
||||||
(y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes;
|
(y1 - y) * maskPR.rowstride +
|
||||||
|
(x1 - x) * maskPR.bytes);
|
||||||
mask = &maskPR;
|
mask = &maskPR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -472,8 +472,8 @@ floating_sel_composite (GimpLayer *layer,
|
||||||
*/
|
*/
|
||||||
gimp_image_apply_image (gimage, layer->fs.drawable, &fsPR,
|
gimp_image_apply_image (gimage, layer->fs.drawable, &fsPR,
|
||||||
undo,
|
undo,
|
||||||
gimp_layer_get_opacity (layer),
|
layer->opacity,
|
||||||
gimp_layer_get_mode (layer),
|
layer->mode,
|
||||||
NULL,
|
NULL,
|
||||||
(x1 - offx), (y1 - offy));
|
(x1 - offx), (y1 - offy));
|
||||||
|
|
||||||
|
|
|
@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
||||||
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
||||||
|
|
||||||
w = MAX (1, width);
|
|
||||||
h = MAX (1, height);
|
|
||||||
|
|
||||||
x1 = CLAMP (x, 0, width);
|
x1 = CLAMP (x, 0, width);
|
||||||
y1 = CLAMP (y, 0, height);
|
y1 = CLAMP (y, 0, height);
|
||||||
x2 = CLAMP (x + w, 0, width);
|
x2 = CLAMP (x + w, 0, width);
|
||||||
|
@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src1PR.w = (x2 - x1);
|
src1PR.w = (x2 - x1);
|
||||||
src1PR.h = (y2 - y1);
|
src1PR.h = (y2 - y1);
|
||||||
src1PR.rowstride = comp->width * src1PR.bytes;
|
src1PR.rowstride = comp->width * src1PR.bytes;
|
||||||
src1PR.data =
|
src1PR.data = (temp_buf_data (comp) +
|
||||||
temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes;
|
y1 * src1PR.rowstride + x1 * src1PR.bytes);
|
||||||
|
|
||||||
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
||||||
src2PR.bytes = layer_buf->bytes;
|
src2PR.bytes = layer_buf->bytes;
|
||||||
|
@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src2PR.x = src1PR.x;
|
src2PR.x = src1PR.x;
|
||||||
src2PR.y = src1PR.y;
|
src2PR.y = src1PR.y;
|
||||||
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
||||||
src2PR.data = temp_buf_data (layer_buf) +
|
src2PR.data = (temp_buf_data (layer_buf) +
|
||||||
(y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes;
|
(y1 - y) * src2PR.rowstride +
|
||||||
|
(x1 - x) * src2PR.bytes);
|
||||||
|
|
||||||
if (layer->mask && layer->mask->apply_mask)
|
if (layer->mask && layer->mask->apply_mask)
|
||||||
{
|
{
|
||||||
|
@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w, h);
|
w, h);
|
||||||
maskPR.bytes = mask_buf->bytes;
|
maskPR.bytes = mask_buf->bytes;
|
||||||
maskPR.rowstride = mask_buf->width;
|
maskPR.rowstride = mask_buf->width;
|
||||||
maskPR.data = mask_buf_data (mask_buf) +
|
maskPR.data = (mask_buf_data (mask_buf) +
|
||||||
(y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes;
|
(y1 - y) * maskPR.rowstride +
|
||||||
|
(x1 - x) * maskPR.bytes);
|
||||||
mask = &maskPR;
|
mask = &maskPR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -472,8 +472,8 @@ floating_sel_composite (GimpLayer *layer,
|
||||||
*/
|
*/
|
||||||
gimp_image_apply_image (gimage, layer->fs.drawable, &fsPR,
|
gimp_image_apply_image (gimage, layer->fs.drawable, &fsPR,
|
||||||
undo,
|
undo,
|
||||||
gimp_layer_get_opacity (layer),
|
layer->opacity,
|
||||||
gimp_layer_get_mode (layer),
|
layer->mode,
|
||||||
NULL,
|
NULL,
|
||||||
(x1 - offx), (y1 - offy));
|
(x1 - offx), (y1 - offy));
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "pixmaps/delete.xpm"
|
#include "pixmaps/delete.xpm"
|
||||||
#include "pixmaps/duplicate.xpm"
|
#include "pixmaps/duplicate.xpm"
|
||||||
#include "pixmaps/new.xpm"
|
#include "pixmaps/new.xpm"
|
||||||
#include "pixmaps/pennorm.xpm"
|
#include "pixmaps/edit.xpm"
|
||||||
#include "pixmaps/refresh.xpm"
|
#include "pixmaps/refresh.xpm"
|
||||||
|
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ gimp_data_factory_view_init (GimpDataFactoryView *view)
|
||||||
GTK_SIGNAL_FUNC (gimp_data_factory_view_edit_clicked),
|
GTK_SIGNAL_FUNC (gimp_data_factory_view_edit_clicked),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
pixmap = gimp_pixmap_new (pennorm_xpm);
|
pixmap = gimp_pixmap_new (edit_xpm);
|
||||||
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
||||||
gtk_widget_show (pixmap);
|
gtk_widget_show (pixmap);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "pixmaps/lower.xpm"
|
#include "pixmaps/lower.xpm"
|
||||||
#include "pixmaps/duplicate.xpm"
|
#include "pixmaps/duplicate.xpm"
|
||||||
#include "pixmaps/new.xpm"
|
#include "pixmaps/new.xpm"
|
||||||
#include "pixmaps/pennorm.xpm"
|
#include "pixmaps/edit.xpm"
|
||||||
|
|
||||||
|
|
||||||
static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass);
|
static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass);
|
||||||
|
@ -245,7 +245,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
|
||||||
GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked),
|
GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
pixmap = gimp_pixmap_new (pennorm_xpm);
|
pixmap = gimp_pixmap_new (edit_xpm);
|
||||||
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
||||||
gtk_widget_show (pixmap);
|
gtk_widget_show (pixmap);
|
||||||
|
|
||||||
|
|
|
@ -3911,9 +3911,6 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
w = (gint) RINT (ratio * gimp_drawable_width (GIMP_DRAWABLE (layer)));
|
||||||
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
h = (gint) RINT (ratio * gimp_drawable_height (GIMP_DRAWABLE (layer)));
|
||||||
|
|
||||||
w = MAX (1, width);
|
|
||||||
h = MAX (1, height);
|
|
||||||
|
|
||||||
x1 = CLAMP (x, 0, width);
|
x1 = CLAMP (x, 0, width);
|
||||||
y1 = CLAMP (y, 0, height);
|
y1 = CLAMP (y, 0, height);
|
||||||
x2 = CLAMP (x + w, 0, width);
|
x2 = CLAMP (x + w, 0, width);
|
||||||
|
@ -3925,8 +3922,8 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src1PR.w = (x2 - x1);
|
src1PR.w = (x2 - x1);
|
||||||
src1PR.h = (y2 - y1);
|
src1PR.h = (y2 - y1);
|
||||||
src1PR.rowstride = comp->width * src1PR.bytes;
|
src1PR.rowstride = comp->width * src1PR.bytes;
|
||||||
src1PR.data =
|
src1PR.data = (temp_buf_data (comp) +
|
||||||
temp_buf_data (comp) + y1 * src1PR.rowstride + x1 * src1PR.bytes;
|
y1 * src1PR.rowstride + x1 * src1PR.bytes);
|
||||||
|
|
||||||
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
layer_buf = gimp_viewable_get_preview (GIMP_VIEWABLE (layer), w, h);
|
||||||
src2PR.bytes = layer_buf->bytes;
|
src2PR.bytes = layer_buf->bytes;
|
||||||
|
@ -3935,8 +3932,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
src2PR.x = src1PR.x;
|
src2PR.x = src1PR.x;
|
||||||
src2PR.y = src1PR.y;
|
src2PR.y = src1PR.y;
|
||||||
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
src2PR.rowstride = layer_buf->width * src2PR.bytes;
|
||||||
src2PR.data = temp_buf_data (layer_buf) +
|
src2PR.data = (temp_buf_data (layer_buf) +
|
||||||
(y1 - y) * src2PR.rowstride + (x1 - x) * src2PR.bytes;
|
(y1 - y) * src2PR.rowstride +
|
||||||
|
(x1 - x) * src2PR.bytes);
|
||||||
|
|
||||||
if (layer->mask && layer->mask->apply_mask)
|
if (layer->mask && layer->mask->apply_mask)
|
||||||
{
|
{
|
||||||
|
@ -3944,8 +3942,9 @@ gimp_image_get_new_preview (GimpViewable *viewable,
|
||||||
w, h);
|
w, h);
|
||||||
maskPR.bytes = mask_buf->bytes;
|
maskPR.bytes = mask_buf->bytes;
|
||||||
maskPR.rowstride = mask_buf->width;
|
maskPR.rowstride = mask_buf->width;
|
||||||
maskPR.data = mask_buf_data (mask_buf) +
|
maskPR.data = (mask_buf_data (mask_buf) +
|
||||||
(y1 - y) * maskPR.rowstride + (x1 - x) * maskPR.bytes;
|
(y1 - y) * maskPR.rowstride +
|
||||||
|
(x1 - x) * maskPR.bytes);
|
||||||
mask = &maskPR;
|
mask = &maskPR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -150,7 +150,8 @@ tool_manager_initialize_tool (GimpTool *tool, /* FIXME: remove tool param */
|
||||||
|
|
||||||
gimp_tool_initialize (active_tool, gdisp);
|
gimp_tool_initialize (active_tool, gdisp);
|
||||||
|
|
||||||
active_tool->drawable = gimp_image_active_drawable (gdisp->gimage);
|
if (gdisp)
|
||||||
|
active_tool->drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||||
|
|
||||||
/* don't set tool->gdisp here! (see commands.c) */
|
/* don't set tool->gdisp here! (see commands.c) */
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "pixmaps/delete.xpm"
|
#include "pixmaps/delete.xpm"
|
||||||
#include "pixmaps/duplicate.xpm"
|
#include "pixmaps/duplicate.xpm"
|
||||||
#include "pixmaps/new.xpm"
|
#include "pixmaps/new.xpm"
|
||||||
#include "pixmaps/pennorm.xpm"
|
#include "pixmaps/edit.xpm"
|
||||||
#include "pixmaps/refresh.xpm"
|
#include "pixmaps/refresh.xpm"
|
||||||
|
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ gimp_data_factory_view_init (GimpDataFactoryView *view)
|
||||||
GTK_SIGNAL_FUNC (gimp_data_factory_view_edit_clicked),
|
GTK_SIGNAL_FUNC (gimp_data_factory_view_edit_clicked),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
pixmap = gimp_pixmap_new (pennorm_xpm);
|
pixmap = gimp_pixmap_new (edit_xpm);
|
||||||
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
||||||
gtk_widget_show (pixmap);
|
gtk_widget_show (pixmap);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "pixmaps/lower.xpm"
|
#include "pixmaps/lower.xpm"
|
||||||
#include "pixmaps/duplicate.xpm"
|
#include "pixmaps/duplicate.xpm"
|
||||||
#include "pixmaps/new.xpm"
|
#include "pixmaps/new.xpm"
|
||||||
#include "pixmaps/pennorm.xpm"
|
#include "pixmaps/edit.xpm"
|
||||||
|
|
||||||
|
|
||||||
static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass);
|
static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass);
|
||||||
|
@ -245,7 +245,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
|
||||||
GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked),
|
GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
pixmap = gimp_pixmap_new (pennorm_xpm);
|
pixmap = gimp_pixmap_new (edit_xpm);
|
||||||
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
||||||
gtk_widget_show (pixmap);
|
gtk_widget_show (pixmap);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "pixmaps/lower.xpm"
|
#include "pixmaps/lower.xpm"
|
||||||
#include "pixmaps/duplicate.xpm"
|
#include "pixmaps/duplicate.xpm"
|
||||||
#include "pixmaps/new.xpm"
|
#include "pixmaps/new.xpm"
|
||||||
#include "pixmaps/pennorm.xpm"
|
#include "pixmaps/edit.xpm"
|
||||||
|
|
||||||
|
|
||||||
static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass);
|
static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass);
|
||||||
|
@ -245,7 +245,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
|
||||||
GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked),
|
GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
pixmap = gimp_pixmap_new (pennorm_xpm);
|
pixmap = gimp_pixmap_new (edit_xpm);
|
||||||
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
||||||
gtk_widget_show (pixmap);
|
gtk_widget_show (pixmap);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "pixmaps/lower.xpm"
|
#include "pixmaps/lower.xpm"
|
||||||
#include "pixmaps/duplicate.xpm"
|
#include "pixmaps/duplicate.xpm"
|
||||||
#include "pixmaps/new.xpm"
|
#include "pixmaps/new.xpm"
|
||||||
#include "pixmaps/pennorm.xpm"
|
#include "pixmaps/edit.xpm"
|
||||||
|
|
||||||
|
|
||||||
static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass);
|
static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass);
|
||||||
|
@ -245,7 +245,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
|
||||||
GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked),
|
GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
pixmap = gimp_pixmap_new (pennorm_xpm);
|
pixmap = gimp_pixmap_new (edit_xpm);
|
||||||
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
||||||
gtk_widget_show (pixmap);
|
gtk_widget_show (pixmap);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "pixmaps/lower.xpm"
|
#include "pixmaps/lower.xpm"
|
||||||
#include "pixmaps/duplicate.xpm"
|
#include "pixmaps/duplicate.xpm"
|
||||||
#include "pixmaps/new.xpm"
|
#include "pixmaps/new.xpm"
|
||||||
#include "pixmaps/pennorm.xpm"
|
#include "pixmaps/edit.xpm"
|
||||||
|
|
||||||
|
|
||||||
static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass);
|
static void gimp_drawable_list_view_class_init (GimpDrawableListViewClass *klass);
|
||||||
|
@ -245,7 +245,7 @@ gimp_drawable_list_view_init (GimpDrawableListView *view)
|
||||||
GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked),
|
GTK_SIGNAL_FUNC (gimp_drawable_list_view_edit_clicked),
|
||||||
view);
|
view);
|
||||||
|
|
||||||
pixmap = gimp_pixmap_new (pennorm_xpm);
|
pixmap = gimp_pixmap_new (edit_xpm);
|
||||||
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
gtk_container_add (GTK_CONTAINER (view->edit_button), pixmap);
|
||||||
gtk_widget_show (pixmap);
|
gtk_widget_show (pixmap);
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ EXTRA_DIST = \
|
||||||
default.xpm \
|
default.xpm \
|
||||||
delete.xpm \
|
delete.xpm \
|
||||||
duplicate.xpm \
|
duplicate.xpm \
|
||||||
|
edit.xpm \
|
||||||
eek.xpm \
|
eek.xpm \
|
||||||
eye.xbm \
|
eye.xbm \
|
||||||
first.xpm \
|
first.xpm \
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
/* XPM */
|
||||||
|
static char * edit_xpm[] = {
|
||||||
|
"16 16 34 1",
|
||||||
|
" c None",
|
||||||
|
". c #000000",
|
||||||
|
"+ c #FFFFFF",
|
||||||
|
"@ c #F0F0F0",
|
||||||
|
"# c #F6F6F6",
|
||||||
|
"$ c #CCCCCC",
|
||||||
|
"% c #F5F5F5",
|
||||||
|
"& c #F7F7F7",
|
||||||
|
"* c #F9F9F9",
|
||||||
|
"= c #EEEEEE",
|
||||||
|
"- c #E6E6E6",
|
||||||
|
"; c #DDDDDD",
|
||||||
|
"> c #DBDBDB",
|
||||||
|
", c #F2F2F2",
|
||||||
|
"' c #FAFAFA",
|
||||||
|
") c #666666",
|
||||||
|
"! c #F8F8F8",
|
||||||
|
"~ c #E7E7E7",
|
||||||
|
"{ c #F3F3F3",
|
||||||
|
"] c #EFEFEF",
|
||||||
|
"^ c #E1E1E1",
|
||||||
|
"/ c #D8D8D8",
|
||||||
|
"( c #F4F4F4",
|
||||||
|
"_ c #EBEBEB",
|
||||||
|
": c #DFDFDF",
|
||||||
|
"< c #E8E8E8",
|
||||||
|
"[ c #E5E5E5",
|
||||||
|
"} c #DADADA",
|
||||||
|
"| c #C9C9C9",
|
||||||
|
"1 c #D3D3D3",
|
||||||
|
"2 c #D2D2D2",
|
||||||
|
"3 c #CDCDCD",
|
||||||
|
"4 c #C7C7C7",
|
||||||
|
"5 c #BDBDBD",
|
||||||
|
" .. ",
|
||||||
|
" .+..",
|
||||||
|
" ........+...",
|
||||||
|
" ..@++++.++.. ",
|
||||||
|
" .+.#+++.++.. ",
|
||||||
|
" .+$.%&*.++.. ",
|
||||||
|
".....=+.++.. ",
|
||||||
|
".=-;>,'.+... ",
|
||||||
|
".++@++....). ",
|
||||||
|
".++!++..~-). ",
|
||||||
|
".+#%&{]~^/). ",
|
||||||
|
".+(#%_-:>/). ",
|
||||||
|
".+<[~^}/$|). ",
|
||||||
|
".+^;>12345). ",
|
||||||
|
".$))))))))). ",
|
||||||
|
"............ "};
|
Loading…
Reference in New Issue