Added support to offsetY and offsetX