[gegl] sampler: tweak of the check for whether the requested context_rect fits within the current sampler_r
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] sampler: tweak of the check for whether the requested context_rect fits within the current sampler_r
- Date: Fri, 1 Jul 2011 03:40:48 +0000 (UTC)
commit 1ea8af0d327d5b7f4b528855fc9828a601a5ff4f
Author: Nicolas Robidoux <nicolas robidoux gmail com>
Date: Tue Jun 28 09:30:47 2011 -0400
sampler: tweak of the check for whether the requested context_rect fits within the current sampler_rectangle + copyright
gegl/buffer/gegl-sampler.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler.c b/gegl/buffer/gegl-sampler.c
index 4409e63..68c5133 100644
--- a/gegl/buffer/gegl-sampler.c
+++ b/gegl/buffer/gegl-sampler.c
@@ -15,6 +15,8 @@
* <http://www.gnu.org/licenses/>.
*
* 2007 Â Ãyvind KolÃs
+ * 2009 Â Nicolas Robidoux
+ * 2011 Â Adam Turcotte
*/
#include "config.h"
@@ -245,10 +247,10 @@ gegl_sampler_get_ptr (GeglSampler *const sampler,
( y + sampler->context_rect[0].y < sampler->sampler_rectangle[0].y )
||
( x + sampler->context_rect[0].x + sampler->context_rect[0].width
- >= sampler->sampler_rectangle[0].x + sampler->sampler_rectangle[0].width )
+ > sampler->sampler_rectangle[0].x + sampler->sampler_rectangle[0].width )
||
( y + sampler->context_rect[0].y + sampler->context_rect[0].height
- >= sampler->sampler_rectangle[0].y + sampler->sampler_rectangle[0].height ))
+ > sampler->sampler_rectangle[0].y + sampler->sampler_rectangle[0].height ))
{
/*
* fetch_rectangle will become the value of
@@ -335,9 +337,9 @@ gegl_sampler_get_from_buffer (GeglSampler *const sampler,
||
( y < sampler->sampler_rectangle[0].y )
||
- ( x >= sampler->sampler_rectangle[0].x + sampler->sampler_rectangle[0].width )
+ ( x > sampler->sampler_rectangle[0].x + sampler->sampler_rectangle[0].width )
||
- ( y >= sampler->sampler_rectangle[0].y + sampler->sampler_rectangle[0].height ))
+ ( y > sampler->sampler_rectangle[0].y + sampler->sampler_rectangle[0].height ))
{
/*
* fetch_rectangle will become the value of
@@ -413,10 +415,10 @@ gegl_sampler_get_from_mipmap (GeglSampler *const sampler,
( y + sampler->context_rect[level].y < sampler->sampler_rectangle[level].y )
||
( x + sampler->context_rect[level].x + sampler->context_rect[level].width
- >= sampler->sampler_rectangle[level].x + sampler->sampler_rectangle[level].width )
+ > sampler->sampler_rectangle[level].x + sampler->sampler_rectangle[level].width )
||
( y + sampler->context_rect[level].y + sampler->context_rect[level].height
- >= sampler->sampler_rectangle[level].y + sampler->sampler_rectangle[level].height ))
+ > sampler->sampler_rectangle[level].y + sampler->sampler_rectangle[level].height ))
{
/*
* fetch_rectangle will become the value of
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]