right - left is not the width, but width - 1. Take left:2, right:3: width should be 2, not 1, or?
Same with height.