Added support for Horizontal/Vertical Flipping