ctrans: add getter for offsets

This commit is contained in:
Dane Springmeyer 2013-10-03 12:06:52 -07:00
parent 879aec064a
commit 5f092c7130

View file

@ -128,7 +128,7 @@ private:
public: public:
CoordTransform(int width, int height, const box2d<double>& extent, CoordTransform(int width, int height, const box2d<double>& extent,
double offset_x = 0, double offset_y = 0) double offset_x = 0.0, double offset_y = 0.0)
: width_(width), : width_(width),
height_(height), height_(height),
extent_(extent), extent_(extent),
@ -143,6 +143,16 @@ public:
sy_ = static_cast<double>(height_) / extent_.height(); sy_ = static_cast<double>(height_) / extent_.height();
} }
inline double offset_x() const
{
return offset_x_;
}
inline double offset_y() const
{
return offset_y_;
}
inline int width() const inline int width() const
{ {
return width_; return width_;