compute width rather than use right/bottom edges as width