From 492d433e23eafdd37f4afc3e73df661a73dd9380 Mon Sep 17 00:00:00 2001 From: Manu Cornet Date: Thu, 22 Aug 2024 12:32:18 +0000 Subject: [PATCH] Add a few comments to make it clearer what the source and destination are when copying pixels --- src/render.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/render.c b/src/render.c index e5c4e4c..503d7ff 100644 --- a/src/render.c +++ b/src/render.c @@ -163,9 +163,11 @@ gint32 render(gint32 image_ID, ////////////////// ///////////////// // Retrieve the initial image into the patch. + // patch = destination buffer, rgn_in = source gimp_pixel_rgn_get_rect (&rgn_in, patch, 0, 0, width_p, height_p); // Then paste a first patch at position (0,0) of the out image. + // patch = source buffer, rgn_out = destination gimp_pixel_rgn_set_rect (&rgn_out, patch, 0, 0, width_p, height_p); // And declare we have already filled in the corresponding pixels. @@ -174,6 +176,7 @@ gint32 render(gint32 image_ID, } // Retrieve all of the current image into image. + // image = destination buffer, rgn_out = source gimp_pixel_rgn_get_rect (&rgn_out, image, 0, 0, width_i, height_i); @@ -228,6 +231,7 @@ gint32 render(gint32 image_ID, ////////////////////// Last clean up ///////////////////// ////////////////////// ///////////////////// + // image = source buffer, rgn_out = destination gimp_pixel_rgn_set_rect(&rgn_out, image, 0, 0, width_i, height_i); gimp_drawable_flush(new_drawable);