reference/ocr-new/Point.h
changeset 0 6b8091ca909a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reference/ocr-new/Point.h	Thu May 18 23:12:51 2006 +0200
@@ -0,0 +1,53 @@
+#ifndef _POINT_H
+#define _POINT_H
+
+class Point{
+	public:
+		Point(int xCoord = -1, int yCoord= -1)
+		  : fx(xCoord), fy(yCoord) {};
+
+		inline int & x(){return fx;}
+		inline int & y() {return fy;};
+
+
+		// Relational operators
+
+		inline bool operator ==(Point p)
+		  { return (fx == p.x() && fy == p.y());};
+		inline bool operator !=(Point p)
+		  { return (fx != p.x() || fy != p.y());};
+		inline bool operator < (Point p)
+		  { return (fx < p.x()) && (fy < p.y()); };
+		inline bool operator  > (Point p)
+		  { return (fx > p.x()) && (fy > p.y()); };
+		inline bool operator <=(Point p)
+		  { return (fx <= p.x()) && (fy <= p.y()); };
+		inline bool operator >=(Point p)
+		  { return (fx >= p.x()) && (fy >= p.y()); };
+
+	private:
+		int fx;
+		int fy;
+};
+
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+