Allow altering polygon coordinates
This commit is contained in:
parent
a88ccf793b
commit
e9d3449929
|
@ -47,10 +47,14 @@ public:
|
|||
|
||||
inline const Coord &Lo() const { return lo; }
|
||||
inline int LoX() const { return lo.X(); }
|
||||
inline int LoX(int p_lo_x) { return lo.X(p_lo_x); }
|
||||
inline int LoY() const { return lo.Y(); }
|
||||
inline int LoY(int p_lo_y) { return lo.Y(p_lo_y); }
|
||||
inline const Coord &Hi() const { return hi; }
|
||||
inline int HiX() const { return hi.X(); }
|
||||
inline int HiX(int p_hi_x) { return hi.X(p_hi_x); }
|
||||
inline int HiY() const { return hi.Y(); }
|
||||
inline int HiY(int p_hi_y) { return hi.Y(p_hi_y); }
|
||||
inline const Coord &Size() const { return size; }
|
||||
inline int Width() const { return size.X(); }
|
||||
inline int Height() const { return size.Y(); }
|
||||
|
|
|
@ -38,14 +38,14 @@ public:
|
|||
y = coord.y;
|
||||
return *this;
|
||||
}
|
||||
inline int &X() { return( x ); }
|
||||
inline const int &X() const { return( x ); }
|
||||
inline int &Y() { return( y ); }
|
||||
inline const int &Y() const { return( y ); }
|
||||
inline int &X(int p_x) { x=p_x; return x; }
|
||||
inline const int &X() const { return x; }
|
||||
inline int &Y(int p_y) { y=p_y; return y; }
|
||||
inline const int &Y() const { return y; }
|
||||
|
||||
inline static Coord Range( const Coord &coord1, const Coord &coord2 ) {
|
||||
Coord result( (coord1.x-coord2.x)+1, (coord1.y-coord2.y)+1 );
|
||||
return( result );
|
||||
return result;
|
||||
}
|
||||
|
||||
inline bool operator==( const Coord &coord ) { return( x == coord.x && y == coord.y ); }
|
||||
|
|
|
@ -100,9 +100,13 @@ public:
|
|||
|
||||
inline const Box &Extent() const { return extent; }
|
||||
inline int LoX() const { return extent.LoX(); }
|
||||
inline int LoX(int p_lo_x) { return extent.LoX(p_lo_x); }
|
||||
inline int HiX() const { return extent.HiX(); }
|
||||
inline int HiX(int p_hi_x) { return extent.HiX(p_hi_x); }
|
||||
inline int LoY() const { return extent.LoY(); }
|
||||
inline int LoY(int p_lo_y) { return extent.LoY(p_lo_y); }
|
||||
inline int HiY() const { return extent.HiY(); }
|
||||
inline int HiY(int p_hi_y) { return extent.HiY(p_hi_y); }
|
||||
inline int Width() const { return extent.Width(); }
|
||||
inline int Height() const { return extent.Height(); }
|
||||
|
||||
|
|
Loading…
Reference in New Issue