fully working pixel perfect collision detection with flipX support