Commit fc1d8b15 authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Fixing bug #28

parent 104a3bcd
......@@ -160,7 +160,19 @@ class ImageWidgetBase
/** Initialize the widget */
virtual void Init(int x, int y, int w, int h, const char * l);
/** Get the buffer index from the iterator position and the buffered region */
inline unsigned int GetBufferIndex(const IndexType& iteratorIndex)
return (iteratorIndex[1]-m_BufferedRegion.GetIndex()[1])*4*m_BufferedRegion.GetSize()[0]
+ 4*(iteratorIndex()[0]-m_BufferedRegion.GetIndex()[0]);
inline unsigned int GetRevertedBufferIndex(const IndexType& iteratorIndex)
return (m_BufferedRegion.GetSize()[1]-1+m_BufferedRegion.GetIndex()[1]-iteratorIndex[1])*4*m_BufferedRegion.GetSize()[0]
+ 4*(iteratorIndex[0]-m_BufferedRegion.GetIndex()[0]);
/** Constructor */
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment