mirror of https://github.com/GNOME/gimp.git
fixed typo: use x1 instead of the uninitialized variable x.
2003-05-15 Sven Neumann <sven@gimp.org> * app/core/gimpdrawable-transform.c (gimp_drawable_transform_tiles_affine): fixed typo: use x1 instead of the uninitialized variable x. * app/paint-funcs/paint-funcs-generic.h * app/paint-funcs/paint-funcs.[ch]: removed unused variable has_alpha from blend_pixels() function. * app/base/temp-buf.c: cosmetics.
This commit is contained in:
parent
984eef2500
commit
254cfb27ad
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2003-05-15 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/core/gimpdrawable-transform.c
|
||||||
|
(gimp_drawable_transform_tiles_affine): fixed typo: use x1 instead
|
||||||
|
of the uninitialized variable x.
|
||||||
|
|
||||||
|
* app/paint-funcs/paint-funcs-generic.h
|
||||||
|
* app/paint-funcs/paint-funcs.[ch]: removed unused variable
|
||||||
|
has_alpha from blend_pixels() function.
|
||||||
|
|
||||||
|
* app/base/temp-buf.c: cosmetics.
|
||||||
|
|
||||||
2003-05-15 Michael Natterer <mitch@gimp.org>
|
2003-05-15 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/gui/vectors-commands.[ch]: added new function
|
* app/gui/vectors-commands.[ch]: added new function
|
||||||
|
|
|
@ -241,10 +241,10 @@ temp_buf_new (gint width,
|
||||||
parameters into a newly allocated tempbuf */
|
parameters into a newly allocated tempbuf */
|
||||||
|
|
||||||
TempBuf *
|
TempBuf *
|
||||||
temp_buf_new_check (gint width,
|
temp_buf_new_check (gint width,
|
||||||
gint height,
|
gint height,
|
||||||
GimpCheckType check_type,
|
GimpCheckType check_type,
|
||||||
GimpCheckSize check_size)
|
GimpCheckSize check_size)
|
||||||
{
|
{
|
||||||
TempBuf *newbuf;
|
TempBuf *newbuf;
|
||||||
guchar *data;
|
guchar *data;
|
||||||
|
@ -495,15 +495,13 @@ temp_buf_copy_area (TempBuf *src,
|
||||||
srcPR.w = width;
|
srcPR.w = width;
|
||||||
srcPR.h = height;
|
srcPR.h = height;
|
||||||
srcPR.rowstride = src->bytes * src->width;
|
srcPR.rowstride = src->bytes * src->width;
|
||||||
srcPR.data = (temp_buf_data (src) +
|
srcPR.data = temp_buf_data (src) + (y1 * srcPR.rowstride +
|
||||||
y1 * srcPR.rowstride +
|
x1 * srcPR.bytes);
|
||||||
x1 * srcPR.bytes);
|
|
||||||
|
|
||||||
destPR.bytes = dest->bytes;
|
destPR.bytes = dest->bytes;
|
||||||
destPR.rowstride = new->bytes * new->width;
|
destPR.rowstride = new->bytes * new->width;
|
||||||
destPR.data = (temp_buf_data (new) +
|
destPR.data = temp_buf_data (new) + (dest_y * destPR.rowstride +
|
||||||
dest_y * destPR.rowstride +
|
dest_x * destPR.bytes);
|
||||||
dest_x * destPR.bytes);
|
|
||||||
|
|
||||||
copy_region (&srcPR, &destPR);
|
copy_region (&srcPR, &destPR);
|
||||||
|
|
||||||
|
|
|
@ -240,7 +240,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
new_tiles = tile_manager_new (x2 - x1, y2 - y1,
|
new_tiles = tile_manager_new (x2 - x1, y2 - y1,
|
||||||
tile_manager_bpp (orig_tiles));
|
tile_manager_bpp (orig_tiles));
|
||||||
pixel_region_init (&destPR, new_tiles,
|
pixel_region_init (&destPR, new_tiles,
|
||||||
0, 0, x2 - x, y2 - y1, TRUE);
|
0, 0, x2 - x1, y2 - y1, TRUE);
|
||||||
tile_manager_set_offsets (new_tiles, x1, y1);
|
tile_manager_set_offsets (new_tiles, x1, y1);
|
||||||
|
|
||||||
/* initialise the pixel_surround and pixel_cache accessors */
|
/* initialise the pixel_surround and pixel_cache accessors */
|
||||||
|
@ -571,8 +571,8 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
|
||||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
|
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
|
||||||
|
|
||||||
/* Start a transform undo group */
|
/* Start a transform undo group */
|
||||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM,
|
gimp_image_undo_group_start (gimage,
|
||||||
_("Transform"));
|
GIMP_UNDO_GROUP_TRANSFORM, _("Transform"));
|
||||||
|
|
||||||
/* Cut/Copy from the specified drawable */
|
/* Cut/Copy from the specified drawable */
|
||||||
orig_tiles = gimp_drawable_transform_cut (drawable, &new_layer);
|
orig_tiles = gimp_drawable_transform_cut (drawable, &new_layer);
|
||||||
|
|
|
@ -240,7 +240,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
new_tiles = tile_manager_new (x2 - x1, y2 - y1,
|
new_tiles = tile_manager_new (x2 - x1, y2 - y1,
|
||||||
tile_manager_bpp (orig_tiles));
|
tile_manager_bpp (orig_tiles));
|
||||||
pixel_region_init (&destPR, new_tiles,
|
pixel_region_init (&destPR, new_tiles,
|
||||||
0, 0, x2 - x, y2 - y1, TRUE);
|
0, 0, x2 - x1, y2 - y1, TRUE);
|
||||||
tile_manager_set_offsets (new_tiles, x1, y1);
|
tile_manager_set_offsets (new_tiles, x1, y1);
|
||||||
|
|
||||||
/* initialise the pixel_surround and pixel_cache accessors */
|
/* initialise the pixel_surround and pixel_cache accessors */
|
||||||
|
@ -571,8 +571,8 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
|
||||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
|
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
|
||||||
|
|
||||||
/* Start a transform undo group */
|
/* Start a transform undo group */
|
||||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM,
|
gimp_image_undo_group_start (gimage,
|
||||||
_("Transform"));
|
GIMP_UNDO_GROUP_TRANSFORM, _("Transform"));
|
||||||
|
|
||||||
/* Cut/Copy from the specified drawable */
|
/* Cut/Copy from the specified drawable */
|
||||||
orig_tiles = gimp_drawable_transform_cut (drawable, &new_layer);
|
orig_tiles = gimp_drawable_transform_cut (drawable, &new_layer);
|
||||||
|
|
|
@ -169,8 +169,7 @@ blend_pixels (const guchar *src1,
|
||||||
guchar *dest,
|
guchar *dest,
|
||||||
guchar blend,
|
guchar blend,
|
||||||
guint w,
|
guint w,
|
||||||
guint bytes,
|
guint bytes)
|
||||||
guint has_alpha)
|
|
||||||
{
|
{
|
||||||
guint b;
|
guint b;
|
||||||
const guchar blend2 = (255 - blend);
|
const guchar blend2 = (255 - blend);
|
||||||
|
|
|
@ -2103,7 +2103,7 @@ blend_region (PixelRegion *src1,
|
||||||
|
|
||||||
while (h --)
|
while (h --)
|
||||||
{
|
{
|
||||||
blend_pixels (s1, s2, d, blend, src1->w, src1->bytes, FALSE);
|
blend_pixels (s1, s2, d, blend, src1->w, src1->bytes);
|
||||||
s1 += src1->rowstride;
|
s1 += src1->rowstride;
|
||||||
s2 += src2->rowstride;
|
s2 += src2->rowstride;
|
||||||
d += dest->rowstride;
|
d += dest->rowstride;
|
||||||
|
|
|
@ -34,7 +34,7 @@ void blend_pixels (const guchar *src1,
|
||||||
const guchar *src2,
|
const guchar *src2,
|
||||||
guchar *dest,
|
guchar *dest,
|
||||||
guchar blend, guint w,
|
guchar blend, guint w,
|
||||||
guint bytes, guint has_alpha);
|
guint bytes);
|
||||||
|
|
||||||
void shade_pixels (const guchar *src, guchar *dest,
|
void shade_pixels (const guchar *src, guchar *dest,
|
||||||
const guchar *color,
|
const guchar *color,
|
||||||
|
|
Loading…
Reference in New Issue