[gegl: 18/25] comments
- From: Nicolas Robidoux <nrobidoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl: 18/25] comments
- Date: Sun, 25 Nov 2012 02:21:01 +0000 (UTC)
commit 32c2a75e17dab63945c4370547f895706dd3095c
Author: Nicolas Robidoux <nrobidoux git gnome org>
Date: Sat Nov 24 09:51:50 2012 -0500
comments
gegl/buffer/gegl-sampler-cubic.c | 11 ++++++-----
gegl/buffer/gegl-sampler-linear.c | 3 +++
operations/transform/transform-core.c | 7 ++++++-
3 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-cubic.c b/gegl/buffer/gegl-sampler-cubic.c
index 20d58b2..e4eff69 100644
--- a/gegl/buffer/gegl-sampler-cubic.c
+++ b/gegl/buffer/gegl-sampler-cubic.c
@@ -13,7 +13,8 @@
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*
- * 2012 (c) Nicolas Robidoux based on earlier code
+ * Copyright 2012 Nicolas Robidoux based on earlier code
+ * 2012 Massimo Valentini
*/
#include "config.h"
@@ -276,11 +277,11 @@ cubicKernel (const gfloat x,
const gfloat ax = ( x<(gfloat) 0. ? -x : x );
if (x2 <= (gfloat) 1.) return ( (gfloat) ((12-9*b-6*c)/6) * ax +
- (gfloat) ((-18+12*b+6*c)/6) ) * x2 +
- (gfloat) ((6-2*b)/6);
-
+ (gfloat) ((-18+12*b+6*c)/6) ) * x2 +
+ (gfloat) ((6-2*b)/6);
+
if (x2 < (gfloat) 4.) return ( (gfloat) ((-b-6*c)/6) * ax +
- (gfloat) ((6*b+30*c)/6) ) * x2 +
+ (gfloat) ((6*b+30*c)/6) ) * x2 +
(gfloat) ((-12*b-48*c)/6) * ax +
(gfloat) ((8*b+24*c)/6);
diff --git a/gegl/buffer/gegl-sampler-linear.c b/gegl/buffer/gegl-sampler-linear.c
index a1d875d..9882e20 100644
--- a/gegl/buffer/gegl-sampler-linear.c
+++ b/gegl/buffer/gegl-sampler-linear.c
@@ -13,6 +13,9 @@
* You should have received a copy of the GNU Lesser General Public
* License along with GEGL; if not, see
* <http://www.gnu.org/licenses/>.
+ *
+ * Copyright 2011-2012 Nicolas Robidoux based on earlier code
+ * 2012 Massimo Valentini
*/
#include "config.h"
diff --git a/operations/transform/transform-core.c b/operations/transform/transform-core.c
index 50e4ab2..849fc91 100644
--- a/operations/transform/transform-core.c
+++ b/operations/transform/transform-core.c
@@ -465,6 +465,12 @@ gegl_transform_get_bounding_box (GeglOperation *op)
{
OpTransform *transform = OP_TRANSFORM (op);
GeglMatrix3 matrix;
+ /*
+ * This was changed from the earlier {0,0,0,0}. However, in_rect is
+ * enlarged by one less than the width and height of context_rect
+ * when it was enlarged by the full number in earlier versions of
+ * this code.
+ */
GeglRectangle in_rect = {0,0,1,1},
have_rect;
gdouble have_points [8];
@@ -494,7 +500,6 @@ gegl_transform_get_bounding_box (GeglOperation *op)
/*
* Is in_rect = {0,0,0,0} (the empty rectangle with no point in
* it, since width=height=0) used to communicate something?
- * Otherwise, I'd initialize to {0,0,1,1} and put "-1"s below.
*/
return in_rect;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]