use offX and offY as double instead of int