Basically, you need to divide the total height of the item (think of a textbox that keeps going so all the writing fits in, and divide it by the height of the gadget (- the arrow heights), eg image box. That's basically what i do. Also, ya, play with viewport and origin so that you can draw the image, and it stays only in the gadget.
Hope that makes sense :\
Hope that makes sense :\