added XYToIndex() to avoid duplicating the checks for valid coordinates in many different places

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-04-02 21:16:04 +00:00
parent aa66250ba4
commit 5644ac4640
2 changed files with 53 additions and 58 deletions

View File

@@ -354,6 +354,12 @@ public:
protected:
static wxList sm_handlers;
// return the index of the point with the given coordinates or -1 if the
// image is invalid of the coordinates are out of range
//
// note that index must be multiplied by 3 when using it with RGB array
long XYToIndex(int x, int y) const;
private:
friend class WXDLLEXPORT wxImageHandler;