Fix setCoords for negative width and/or height

Change-Id: I8ddb8ad49325e593bff15396f76623351e2c5de4
Merge pull request #1691 from vamo89/setCoordsBug

Fix setCoords for negative width and/or height