KSquare Utilities
KKB::Point Class Reference

Used by Raster class and MorphOp derived classes to denote a single pixel location in Raster image. More...

#include <Point.h>

Public Member Functions

 Point ()
 
 Point (const Point &point)
 
 Point (kkint16 _row, kkint16 _col)
 
 Point (kkint32 _row, kkint32 _col)
 
 Point (float _row, float _col)
 
kkint32 Col () const
 
void Col (kkint32 _col)
 
Point DownOne () const
 
Point LeftOne () const
 
bool operator!= (const Point &r) const
 
Point operator+ (const Point &r) const
 
Point operator- (const Point &r) const
 
Pointoperator= (const Point &r)
 
bool operator== (Point &r) const
 
Point RightOne () const
 
kkint32 Row () const
 
void Row (kkint32 _row)
 
Point UpOne () const
 

Detailed Description

Used by Raster class and MorphOp derived classes to denote a single pixel location in Raster image.

See also
Raster
MorphOp

Definition at line 20 of file Point.h.

Constructor & Destructor Documentation

Point::Point ( )

Definition at line 18 of file Point.cpp.

18  :
19  row (0),
20  col (0)
21 {
22 }
Point::Point ( const Point point)

Definition at line 26 of file Point.cpp.

26  :
27  row (point.row),
28  col (point.col)
29 {
30 }
Point::Point ( kkint16  _row,
kkint16  _col 
)

Definition at line 34 of file Point.cpp.

Referenced by KKB::Raster::DeriveImageLength().

36  :
37  row (_row),
38  col (_col)
39 {}
Point::Point ( float  _row,
float  _col 
)

Definition at line 52 of file Point.cpp.

54  :
55  row ((kkint32)(_row + 0.5)),
56  col ((kkint32)(_col + 0.5))
57 {}
__int32 kkint32
Definition: KKBaseTypes.h:88

Member Function Documentation

void KKB::Point::Col ( kkint32  _col)
inline

Definition at line 43 of file Point.h.

43 {col = _col;}
Point KKB::Point::DownOne ( ) const
inline

Definition at line 46 of file Point.h.

References Point().

46 {return Point (row + 1, col );}
Point KKB::Point::LeftOne ( ) const
inline

Definition at line 47 of file Point.h.

References Point().

47 {return Point (row , col - 1);}
bool Point::operator!= ( const Point r) const

Definition at line 66 of file Point.cpp.

67 {
68  return ((row != r.row) || (col != r.col));
69 }
Point Point::operator+ ( const Point r) const

Definition at line 72 of file Point.cpp.

References Point().

Referenced by KKB::Raster::DrawConnectedPointList().

73 {
74  return Point (row + r.row, col + r.col);
75 }
Point Point::operator- ( const Point r) const

Definition at line 78 of file Point.cpp.

References Point().

79 {
80  return Point (row - r.row, col - r.col);
81 }
Point & Point::operator= ( const Point r)

Definition at line 84 of file Point.cpp.

85 {
86  row = r.row;
87  col = r.col;
88  return *this;
89 }
bool Point::operator== ( Point r) const

Definition at line 60 of file Point.cpp.

61 {
62  return ((row == r.row) && (col == r.col));
63 }
Point KKB::Point::RightOne ( ) const
inline

Definition at line 48 of file Point.h.

References Point().

48 {return Point (row , col + 1);}
void KKB::Point::Row ( kkint32  _row)
inline

Definition at line 42 of file Point.h.

42 {row = _row;}
Point KKB::Point::UpOne ( ) const
inline

Definition at line 45 of file Point.h.

References Point().

45 {return Point (row - 1, col );}

The documentation for this class was generated from the following files: