ctrans: add getter for offsets
This commit is contained in:
parent
879aec064a
commit
5f092c7130
1 changed files with 11 additions and 1 deletions
|
@ -128,7 +128,7 @@ private:
|
|||
|
||||
public:
|
||||
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),
|
||||
height_(height),
|
||||
extent_(extent),
|
||||
|
@ -143,6 +143,16 @@ public:
|
|||
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
|
||||
{
|
||||
return width_;
|
||||
|
|
Loading…
Reference in a new issue