diff --git a/graf2d/asimage/inc/TASImage.h b/graf2d/asimage/inc/TASImage.h index 12dd77f7e05e01803c2aa09a303b60b5652fedac..0bb5548b53fb40607dc7e8b9f2dfef90d5812358 100644 --- a/graf2d/asimage/inc/TASImage.h +++ b/graf2d/asimage/inc/TASImage.h @@ -210,6 +210,7 @@ public: Double_t *GetVecArray(); UInt_t *GetScanline(UInt_t y); void GetImageBuffer(char **buffer, int *size, EImageFileTypes type = TImage::kPng); + void GetZoomPosition(UInt_t &x, UInt_t &y, UInt_t &w, UInt_t &h) const; Bool_t SetImageBuffer(char **buffer, EImageFileTypes type = TImage::kPng); void PaintImage(Drawable_t wid, Int_t x, Int_t y, Int_t xsrc = 0, Int_t ysrc = 0, UInt_t wsrc = 0, UInt_t hsrc = 0, Option_t *opt = ""); void SetPaletteEnabled(Bool_t on = kTRUE); // *TOGGLE* diff --git a/graf2d/asimage/src/TASImage.cxx b/graf2d/asimage/src/TASImage.cxx index 665479d8a14dc2fd436cf3c690a0aac6fe951243..b1adbbb371b0d50c4db89feeb1cb8396f5d14814 100644 --- a/graf2d/asimage/src/TASImage.cxx +++ b/graf2d/asimage/src/TASImage.cxx @@ -2011,6 +2011,18 @@ UInt_t TASImage::GetScaledHeight() const return fScaledImage ? fScaledImage->fImage->height : GetHeight(); } +//______________________________________________________________________________ +void TASImage::GetZoomPosition(UInt_t &x, UInt_t &y, UInt_t &w, UInt_t &h) const +{ + // Return the zoom parameters. This is useful when the zoom has been done + // interactively using the mouse. + + x = fZoomOffX; + y = fZoomOffY; + w = fZoomWidth; + h = fZoomHeight; +} + //______________________________________________________________________________ Bool_t TASImage::InitVisual() {