Commit 8dcebeaa authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

replaced manual calculation of the offset of a pixel in a tile (marked as

2005-09-03  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.c (gimp_paint_core_get_orig_image)
	(gimp_paint_core_get_orig_proj): replaced manual calculation of
	the offset of a pixel in a tile (marked as /* dubious... */ for a
	reason) by simply using the offset parameters of tile_data_pointer().
parent b94ecff5
2005-09-03 Karine Delvare <kdelvare@nerim.net>
2005-09-03 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintcore.c (gimp_paint_core_get_orig_image)
(gimp_paint_core_get_orig_proj): replaced manual calculation of
the offset of a pixel in a tile (marked as /* dubious... */ for a
reason) by simply using the offset parameters of tile_data_pointer().
2005-09-03 Karine Delvare <kdelvare@nerim.net>
* app/tools/gimprectangletool.[ch]
* app/tools/gimprectangleoptions.[ch]: code cleanup, replace
......
......@@ -591,9 +591,9 @@ gimp_paint_core_get_orig_image (GimpPaintCore *core,
undo_tile = tile_manager_get_tile (core->undo_tiles,
srcPR.x, srcPR.y,
TRUE, FALSE);
s = ((guchar *) tile_data_pointer (undo_tile, 0, 0) +
srcPR.rowstride * (srcPR.y % TILE_HEIGHT) +
srcPR.bytes * (srcPR.x % TILE_WIDTH)); /* dubious... */
s = (guchar *) tile_data_pointer (undo_tile,
srcPR.x % TILE_WIDTH,
srcPR.y % TILE_HEIGHT);
}
else
{
......@@ -686,9 +686,9 @@ gimp_paint_core_get_orig_proj (GimpPaintCore *core,
saved_tile = tile_manager_get_tile (core->saved_proj_tiles,
srcPR.x, srcPR.y,
TRUE, FALSE);
s = ((guchar *) tile_data_pointer (saved_tile, 0, 0) +
srcPR.rowstride * (srcPR.y % TILE_HEIGHT) +
srcPR.bytes * (srcPR.x % TILE_WIDTH)); /* dubious... */
s = (guchar *) tile_data_pointer (saved_tile,
srcPR.x % TILE_WIDTH,
srcPR.y % TILE_HEIGHT);
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment