[gegl] value-propagate: issue #129
- From: Thomas Manni <tmanni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] value-propagate: issue #129
- Date: Mon, 18 Feb 2019 10:57:48 +0000 (UTC)
commit 8ecb55461a2d17adfb526537e38ffb83457c463f
Author: woob <thetoastcaper gmail com>
Date: Mon Feb 18 11:44:30 2019 +0100
value-propagate: issue #129
Reverse offsets to propagate in the correct directions.
operations/common-gpl3+/value-propagate.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/operations/common-gpl3+/value-propagate.c b/operations/common-gpl3+/value-propagate.c
index 8e4f574f4..1181acf8b 100644
--- a/operations/common-gpl3+/value-propagate.c
+++ b/operations/common-gpl3+/value-propagate.c
@@ -471,10 +471,14 @@ prepare (GeglOperation *operation)
params = (VPParamsType *) o->user_data;
- params->offset_left = o->left ? -1 : 0;
- params->offset_top = o->top ? -1 : 0;
- params->offset_right = o->right ? 1 : 0;
- params->offset_bottom = o->bottom ? 1 : 0;
+ /* The op's directional paramaters are used in terms of which direction to
+ * propagate _to_, but offset is used for what neighbors a pixel may
+ * propagate _from_. Therefore, directions are reversed between the two.
+ */
+ params->offset_left = o->right ? -1 : 0;
+ params->offset_top = o->bottom ? -1 : 0;
+ params->offset_right = o->left ? 1 : 0;
+ params->offset_bottom = o->top ? 1 : 0;
area->left = area->right = area->top = area->bottom = 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]