[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd/cvd image.h
From: |
Georg Klein |
Subject: |
[libcvd-members] libcvd/cvd image.h |
Date: |
Wed, 27 Sep 2006 15:26:59 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Georg Klein <georgklein> 06/09/27 15:26:59
Modified files:
cvd : image.h
Log message:
Added in_image_with_border
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/image.h?cvsroot=libcvd&r1=1.23&r2=1.24
Patches:
Index: image.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/image.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- image.h 21 Sep 2006 18:54:25 -0000 1.23
+++ image.h 27 Sep 2006 15:26:59 -0000 1.24
@@ -272,6 +272,14 @@
return ir.x >=0 && ir.y >=0 && ir.x < my_size.x && ir.y
< my_size.y;
}
+ /// Is this pixel co-ordinate inside the image, and not too
close to the edges?
+ /// @param ir The co-ordinate to test
+ /// @param border The size of the border: positive points
inside the image.
+ bool in_image_with_border(const ImageRef& ir, int border) const
+ {
+ return ir.x >=border && ir.y >=border && ir.x <
my_size.x - border && ir.y < my_size.y - border;
+ }
+
/// The image data is not destroyed when a BasicImage is
destroyed.
~SubImage()
{}